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

feat: add residue ring/field maps #1559

Merged
merged 1 commit into from
Jan 23, 2024
Merged

feat: add residue ring/field maps #1559

merged 1 commit into from
Jan 23, 2024

Conversation

thofma
Copy link
Member

@thofma thofma commented Jan 19, 2024

No description provided.

@thofma
Copy link
Member Author

thofma commented Jan 19, 2024

@lgoettgens Have you also encountered the following:

julia> using Revise, AbstractAlgebra

julia> R, f = residue_field(ZZ, 2)
(Residue field of integers modulo 2, Map: integers -> residue field)

julia> typeof(R)
AbstractAlgebra.Generic.EuclideanRingResidueField{BigInt}

julia> EuclideanRingResidueRing{BigInt} === AbstractAlgebra.Generic.EuclideanRingResidueRing{BigInt}
true

julia> EuclideanRingResidueRing{BigInt}
EuclideanRingResidueRing{BigInt}

julia> print(EuclideanRingResidueRing{BigInt})
EuclideanRingResidueRing{BigInt}

????

Is it correct, that I cannot make this type print nicely?

@lgoettgens
Copy link
Collaborator

I am not sure I understand the question. Is it about the AbstractAlgebra.Generic prefix only for one of the two types?

@lgoettgens
Copy link
Collaborator

I noticed that the following two lines are only in AbstractAlgebra.jl for EuclideanRingResidueRing and not *Field:

import .Generic: EuclideanRingResidueRing # line 658
export EuclideanRingResidueRing # line 865

and they are not there for things like MPoly or other AbstractAlgebra.Generic.* types.

Does this help for your question?

@lgoettgens
Copy link
Collaborator

Reacting to my comment above and your commit in-between: I would have rather removed the import/export shenanigans for EuclideanRingResidueRing instead of adding them for EuclideanRingResidueField as well, since for the other types in Generic. we don't export them as well (to keep the consistency).

Or do I remember correctly that you wanted to merge the abstract type and the concrete type for both of these? In this case I think one could argue that in this case they should no longer live inside of Generic. but outside and thus are allowed to be exported.

@thofma
Copy link
Member Author

thofma commented Jan 22, 2024

There is no corresponding AbstractAlgebra.EuclideanBla type, so there is no ambiguity when exporting them. Generic contains all concrete types, so I kept them there for now. I think there will eventually be no abstract type, but we can do this later.

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a8efab2) 87.16% compared to head (91946be) 87.11%.
Report is 1 commits behind head on master.

Files Patch % Lines
src/generic/ResidueField.jl 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1559      +/-   ##
==========================================
- Coverage   87.16%   87.11%   -0.06%     
==========================================
  Files         115      114       -1     
  Lines       29412    29483      +71     
==========================================
+ Hits        25638    25685      +47     
- Misses       3774     3798      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- also purge `number_field`
@thofma thofma marked this pull request as ready for review January 23, 2024 03:24
@lgoettgens lgoettgens merged commit 5a441df into master Jan 23, 2024
14 of 15 checks passed
@lgoettgens lgoettgens deleted the th/reswithmap branch January 23, 2024 10:15
ooinaruhugh pushed a commit to ooinaruhugh/AbstractAlgebra.jl that referenced this pull request Feb 15, 2024
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.

2 participants