Skip to content

Add fraction_field_type and define fraction_field method for fields #2092

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fingolfin
Copy link
Member

Seems natural and I see no harm in it?

Copy link

codecov bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 81.48148% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.51%. Comparing base (8ea17bc) to head (60415c6).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
src/Fraction.jl 55.55% 4 Missing ⚠️
src/generic/RationalFunctionField.jl 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2092      +/-   ##
==========================================
+ Coverage   88.35%   88.51%   +0.16%     
==========================================
  Files         126      126              
  Lines       31674    32702    +1028     
==========================================
+ Hits        27984    28946     +962     
- Misses       3690     3756      +66     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lgoettgens
Copy link
Member

Can we then please also have some programmatic way for deciding the type of the fraction field of some ring, i.e. fraction_field_type that usually returns some Generic.FracField{T} thingy, but T for T being a field subtype?

@fingolfin fingolfin changed the title Define fraction_field for fields Define fraction_field for fields May 21, 2025
@fingolfin
Copy link
Member Author

I agree with the idea of adding fraction_field_type, but while looking into it I found a more serious issue:

function fraction_field(a::RationalFunctionField{T, U}) where {T <: FieldElement, U <: Union{PolyRingElem, MPolyRingElem}}
   return a.fraction_field::Union{FracField{U}}
end

And this is also documented, so we can't simply change it.

But I think that kind of throws a wrench into the idea behind this PR sigh; at the very least it would require a breaking release which renames the above fraction_field getter to e.g. underlying_fraction_field (actually I would have expect this to be base_ring, but base_ring on a RationalFunctionField is the base ring / coefficientring of the underlying fraction field / polynomial ring... sigh

@fingolfin fingolfin force-pushed the mh/fraction_field-for-Field branch from 4c14082 to 13c9d7b Compare June 25, 2025 21:27
@fingolfin fingolfin changed the title Define fraction_field for fields Add fraction_field_type and define fraction_field method for fields Jun 25, 2025
@fingolfin fingolfin force-pushed the mh/fraction_field-for-Field branch from 13c9d7b to 97e4466 Compare June 25, 2025 21:33
@fingolfin fingolfin force-pushed the mh/fraction_field-for-Field branch from 97e4466 to 11dd456 Compare June 25, 2025 21:48
Co-authored-by: Lars Göttgens <lars.goettgens@rwth-aachen.de>
@fingolfin fingolfin requested a review from thofma July 2, 2025 18:39
Copy link
Member

@thofma thofma left a comment

Choose a reason for hiding this comment

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

Thanks. I expected it to be breaking, but seems to be fine.

@fingolfin fingolfin closed this Jul 3, 2025
@fingolfin fingolfin reopened this Jul 3, 2025
@fingolfin fingolfin added enhancement New feature or request release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels Jul 3, 2025
@fingolfin fingolfin enabled auto-merge (squash) July 3, 2025 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants