Skip to content

Extend // to create total_ring_of_fractions if necessary#2410

Open
JohnAAbbott wants to merge 7 commits into
Nemocas:masterfrom
JohnAAbbott:JAA/slashslash-total_ring_of_fractions
Open

Extend // to create total_ring_of_fractions if necessary#2410
JohnAAbbott wants to merge 7 commits into
Nemocas:masterfrom
JohnAAbbott:JAA/slashslash-total_ring_of_fractions

Conversation

@JohnAAbbott
Copy link
Copy Markdown
Collaborator

First prototype.
Quick test:

julia> ZZ100,_ = residue_ring(ZZ,100);

julia> ten = ZZ100(10);

julia> 1//ten
ERROR: Division by a zero-divisor

julia> 1//(ten+1)
1//11

@JohnAAbbott JohnAAbbott added the release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes label May 13, 2026
@JohnAAbbott
Copy link
Copy Markdown
Collaborator Author

This is proving a little trickier than anticipated: some tests create, e.g., residue_ring(ZZ,5) and then use // on its elements which creates a result in a FractionField. In the test cases this is actually correct because the starting ring has no non-zero zero-divisors. The revised code sees a starting ring for which is_integral_type gives false, so the result is a total_ring_of_fractions. The consequence is that some functions (e.g. evaluate) which accept a FracFieldElem no longer match the given arguments (of type TotFrac). Should I just chase through and extend these other functions to accept FracFieldElem or TotFrac?? @thofma

@thofma
Copy link
Copy Markdown
Member

thofma commented May 13, 2026

This is proving a little trickier than anticipated: some tests create, e.g., residue_ring(ZZ,5) and then use // on its elements which creates a result in a FractionField. In the test cases this is actually correct because the starting ring has no non-zero zero-divisors. The revised code sees a starting ring for which is_integral_type gives false, so the result is a total_ring_of_fractions. The consequence is that some functions (e.g. evaluate) which accept a FracFieldElem no longer match the given arguments (of type TotFrac). Should I just chase through and extend these other functions to accept FracFieldElem or TotFrac?? @thofma

I think that is the way to go. I would probably just do the minimal number of changes to make the tests pass. Should hopefully not be too many.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.13%. Comparing base (33141c2) to head (7cd46d0).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2410      +/-   ##
==========================================
- Coverage   88.13%   88.13%   -0.01%     
==========================================
  Files         130      130              
  Lines       32948    32970      +22     
==========================================
+ Hits        29038    29057      +19     
- Misses       3910     3913       +3     

☔ 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.

Comment thread src/AbstractTypes.jl
@JohnAAbbott
Copy link
Copy Markdown
Collaborator Author

It's looking better now. What do you think @thofma ?

@JohnAAbbott JohnAAbbott marked this pull request as ready for review May 20, 2026 09:06
@JohnAAbbott JohnAAbbott requested a review from thofma May 29, 2026 12:43
@JohnAAbbott
Copy link
Copy Markdown
Collaborator Author

I believe this is now ready. @thofma?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking 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.

3 participants