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

Extend ideal interface #1731

Merged
merged 10 commits into from
Aug 18, 2024
Merged

Extend ideal interface #1731

merged 10 commits into from
Aug 18, 2024

Conversation

paemurru
Copy link
Contributor

Updating the ideal interface in AbstractAlgebra instead of in OSCAR. This should fix the inconsistencies brought up in oscar-system/Oscar.jl#3826 (comment)

After this pull request is merged, several ideal functions can be deleted in OSCAR.

Copy link

codecov bot commented Jun 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 87.84%. Comparing base (51d35b2) to head (980d758).
Report is 7 commits behind head on master.

Files Patch % Lines
src/Ideal.jl 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1731      +/-   ##
==========================================
+ Coverage   87.65%   87.84%   +0.18%     
==========================================
  Files         117      117              
  Lines       30090    30753     +663     
==========================================
+ Hits        26376    27015     +639     
- Misses       3714     3738      +24     

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

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Two quick comments

src/Ideal.jl Outdated Show resolved Hide resolved
src/Ideal.jl Outdated Show resolved Hide resolved
paemurru and others added 2 commits June 18, 2024 15:25
Co-authored-by: Max Horn <[email protected]>
Before, it might have happened that the command `R * ZZRingElem(2)` fails while `R * big(2)` succeeds.
src/Ideal.jl Outdated Show resolved Hide resolved
src/Ideal.jl Outdated Show resolved Hide resolved
Max: "the advantage is that if some ring type wants to implement say ideal(R::MyRing, n::Int) in a special optimized fashion that avoids constructing R(n), then R*2 would benefit from that"

Co-authored-by: Max Horn <[email protected]>
@fingolfin
Copy link
Member

BTW we could perhaps add some basic tests by defining, say

ideal(R::Integers, x) = Generic.Ideal(R, x)     # in src/julia/Integer.jl
ideal(R::Rationals, x) = Generic.Ideal(R, x)    # in src/julia/Rational.jl

and then we can do some tests... except we can't do much with it, see issue #1734

src/Ideal.jl Outdated Show resolved Hide resolved
paemurru and others added 3 commits July 31, 2024 15:04
Previously, there was a possibility of an infinite recursion if the base functions were not implemented. Also, writing `R(x)` when `x` is a vector is problematic, it might have unexpected results.
src/Ideal.jl Show resolved Hide resolved
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me

@fingolfin fingolfin enabled auto-merge (squash) August 1, 2024 15:28
This is already allowed for Hecke ideals.
For consistency, we allow this already in AbstractAlgebra.
auto-merge was automatically disabled August 1, 2024 18:47

Head branch was pushed to by a user without write access

@thofma thofma closed this Aug 18, 2024
@thofma thofma reopened this Aug 18, 2024
@thofma thofma merged commit 3fc7d25 into Nemocas:master Aug 18, 2024
51 of 58 checks passed
@paemurru paemurru deleted the ep/ideal branch August 19, 2024 21:39
@thofma thofma mentioned this pull request Aug 20, 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.

3 participants