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

Add conformance tests for is_unit & is_nilpotent #1947

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

Conversation

fingolfin
Copy link
Member

Also improve is_nilpotent for matrices / matrix ring elements to work if the base ring is trivial.

Resolves #1941

Copy link

codecov bot commented Dec 22, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.34%. Comparing base (070ea63) to head (ae49289).

Files with missing lines Patch % Lines
ext/TestExt/Rings-conformance-tests.jl 95.52% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1947   +/-   ##
=======================================
  Coverage   88.34%   88.34%           
=======================================
  Files         124      124           
  Lines       31404    31429   +25     
=======================================
+ Hits        27743    27767   +24     
- Misses       3661     3662    +1     

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

@fingolfin
Copy link
Member Author

Test fails:

  Expression: is_unit(a) == is_unit(a ^ 2)
  function is_unit is not implemented for argument
  PBWAlgQuoElem{QQFieldElem, Singular.n_Q}: 1//3*a^2*h^2*f^3*e^3 + 3//2*a^3*h^2*f^2*e^3 + 1//2*a^2*h^3*f*e^2

Perhaps someone (@JohnAAbbott ?) can look into adding that method next year.

In the meantime we could make the test conditional here and skip it if a not-implemented-exception is thrown...

@fingolfin
Copy link
Member Author

@fieker @thofma @lgoettgens just talking to @JohnAAbbott whether we can implement is_unit for PBWAlgQuoElem and, well, it is non-trivial.

So we probably should not insist on this being available. But what would be a good strategy to have such tests (they are useful, I found several bugs in our current code with them!) but allow some rings to opt-out of them because they don't implement a certain feature?

@fingolfin fingolfin force-pushed the mh/conformance-test-is_unit-is_nilpotent branch from aef5263 to bc85fed Compare January 29, 2025 22:53
Also improve is_nilpotent for matrices / matrix ring elements
to work if the base ring is trivial.
@fingolfin fingolfin force-pushed the mh/conformance-test-is_unit-is_nilpotent branch from bc85fed to ae49289 Compare January 31, 2025 19:01
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.

Add conformance tests for is_unit and is_nilpotent
1 participant