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 1 commit 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

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

codecov bot commented Dec 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.22%. Comparing base (e5916d3) to head (aef5263).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1947   +/-   ##
=======================================
  Coverage   88.22%   88.22%           
=======================================
  Files         119      119           
  Lines       30425    30425           
=======================================
+ Hits        26842    26843    +1     
+ Misses       3583     3582    -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?

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