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

Jaa/is nilpotent #1974

Merged
merged 37 commits into from
Jan 9, 2025
Merged

Jaa/is nilpotent #1974

merged 37 commits into from
Jan 9, 2025

Conversation

JohnAAbbott
Copy link
Contributor

Usefully faster implementation of is_nilpotent(::ResElem), but it is longer...

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.01%. Comparing base (fc77b13) to head (956abae).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1974      +/-   ##
==========================================
+ Coverage   87.98%   88.01%   +0.02%     
==========================================
  Files          98       98              
  Lines       36063    36024      -39     
==========================================
- Hits        31730    31705      -25     
+ Misses       4333     4319      -14     

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

src/flint/fmpq.jl Outdated Show resolved Hide resolved
src/flint/fmpz_mod.jl Outdated Show resolved Hide resolved
src/HeckeMoreStuff.jl Outdated Show resolved Hide resolved
src/HeckeMoreStuff.jl Outdated Show resolved Hide resolved
src/flint/nmod.jl Outdated Show resolved Hide resolved
src/flint/nmod_poly.jl Outdated Show resolved Hide resolved
@JohnAAbbott
Copy link
Contributor Author

The new code (or most of it) has been moved into AbstractAlgebra.

@JohnAAbbott
Copy link
Contributor Author

Bother! This PR will work only with the revised AA (see PR 1933 there)

src/flint/fmpq.jl Outdated Show resolved Hide resolved
src/flint/fmpz.jl Outdated Show resolved Hide resolved
src/flint/nmod_mpoly.jl Outdated Show resolved Hide resolved
is_unit(a::fqPolyRepMPolyRingElem) even was wrong (it return true for zero)
The generic code is actually faster than those
@JohnAAbbott
Copy link
Contributor Author

I am wondering whether all tests related to is_nilpotent should be moved into AbstractAlgebra since the implementation now resides there. The distinction between what AbstractAlgebra handles and what Nemo handles is not entirely clear to me.
Maybe some tests need to be duplicated? If I load the package AbstractAlgebra, there is already a function to create residue_ring(ZZ,720); but if I load Nemo (or all of Oscar) as well then residue_ring(ZZ,720) calls a different function, presumably using a different interna; representation. So probably the tests should be made both in the AbstractAlgebra tests and in the Nemo tests.

@fingolfin
Copy link
Member

To summarize what I explained earlier in my office: ideally as much of this testing as possible is done in generic "ring conformance tests" which then can be applied to all ring types we define in AA, Nemo, Hecke, Oscar, or elsewhere. In some cases one may still wish to have additional tests to e.g. cover certain corner cases or otherwise specific quirks of an implementation, these then of course should go into the respective package.

From that perspective the tests in here are not very special, and could just be dropped here.

@JohnAAbbott
Copy link
Contributor Author

Hoping this is now fully complete. The main implementations of is_unit and is_nilpotent for quotient rings of ZZ are now in AbstractAlgebra, but we do some tests here because there are new specialized implementations of quotient rings of ZZ.

@fingolfin fingolfin merged commit d8335aa into Nemocas:master Jan 9, 2025
24 checks passed
@JohnAAbbott JohnAAbbott deleted the JAA/is_nilpotent branch January 9, 2025 09:39
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