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
Better normalization for fraction field elements #16268
Comments
comment:1
The normalization would already be much better if Ku could also figure out that it is also |
Branch: u/robertwb/ticket/16268 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:5
Thanks, Robert, I will review this. I had already started by patching the reduce function but had not yet discoivered where the automatic calling of reduction was actually happening. Your solution -- keeping reduce() and normalise() separate -- looks better. |
Author: Robert Bradshaw |
comment:7
As of yet the documentation at normalize is incorrect. It reads "Returns a normalized representation of self". However it does not return anything. Also, shouldn't normalize in |
Changed branch from u/robertwb/ticket/16268 to u/emassop/ticket/16268 |
comment:9
What is happening here? There are/were two commits by Robert Bradshaw but suddenly the branch name has changed to an emassop name. I assume that this means the emassop is doing something, so I will hold back. New commits:
|
comment:10
I changed the documentation to not say "return". Then did I'm not going to change more, as I'm unfamiliar with the conventions about what normalize in |
comment:12
I couldn't help myself and hacked a bit on this.
I (re)implemented hashing for elements of Q(R[X]) with R an integral domain, by passing from Q(R[X]) to Q(Q(R)[X]), reducing to the case of this bug. I haven't pushed this, as I don't like the architecture in my patch and that should probably be a separate bug anyway. There should probably be separate bug reports for many kinds of rings. |
comment:14
patchbot:
|
comment:15
#15297 is related |
comment:17
#16993 is related. |
Reviewer: Julian Rüth |
comment:59
Thank you! |
comment:60
Merge conflict |
comment:61
Replying to @vbraun:
Should be fixed. Back to needs_review mainly for the patchbot; there shouldn't be any nontrivial changes to review. |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
|
Changed branch from u/mmezzarobba/16268-normalize_fractions to |
Changed commit from |
comment:65
#16993 should probably be closed as a dup of this ticket. Also, should there be a follow-up ticket for the desirable further improvements mentioned in the ticket description? |
This comment has been minimized.
This comment has been minimized.
comment:66
Replying to @mkoeppe:
Yes, thanks, I had forgotten to do that.
Please go ahead if you want to open additional tickets and/or work on these improvements. (I have little time to work on them myself at the moment, unfortunately, but feel free to ping me if some follow-up ticket needs review.) |
comment:67
Follow-up ticket at #26339 |
This comment has been minimized.
This comment has been minimized.
Merged: sage-8.4.beta2 |
Normalize the leading coefficient of the denominator to one when reducing elements of fraction fields of univariate polynomial rings over fields. Doing so
The following further desirable improvements, out of the scope of this ticket, are dealt with at #26339:
Original description:
If K is a field then K(u), the function field, has a reduce() method which cancels the gcd but does not put into a canonical form by (for example) dividing through by the leading coefficient of the denominator to make the denominator monic. This means that equal elements may have different hashes, and hence that putting function field elements into a set does not work as a mathematician would expect. For example:
CC: @tscrim @cheuberg @Etn40ff @sagetrac-jakobkroeker @bhutz @slel
Component: algebra
Author: Robert Bradshaw, Erik Massop, Marc Mezzarobba
Branch:
af91bf5
Reviewer: Julian Rüth
Merged: sage-8.4.beta2
Issue created by migration from https://trac.sagemath.org/ticket/16268
The text was updated successfully, but these errors were encountered: