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 is_finite methods for various ring types #1842

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

fingolfin
Copy link
Member

Also add missing (but documented) characteristic method for
FreeAssociativeAlgebra

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 41.17647% with 10 lines in your changes missing coverage. Please review.

Project coverage is 88.10%. Comparing base (69ba0a5) to head (791f95f).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/LaurentPoly.jl 0.00% 2 Missing ⚠️
src/Rings.jl 60.00% 2 Missing ⚠️
src/FreeAssociativeAlgebra.jl 50.00% 1 Missing ⚠️
src/LaurentMPoly.jl 50.00% 1 Missing ⚠️
src/MPoly.jl 50.00% 1 Missing ⚠️
src/MatRing.jl 50.00% 1 Missing ⚠️
src/NCPoly.jl 0.00% 1 Missing ⚠️
src/Poly.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1842      +/-   ##
==========================================
- Coverage   88.14%   88.10%   -0.04%     
==========================================
  Files         120      120              
  Lines       30019    30031      +12     
==========================================
- Hits        26459    26458       -1     
- Misses       3560     3573      +13     

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

src/LaurentPoly.jl Outdated Show resolved Hide resolved
src/NCPoly.jl Outdated Show resolved Hide resolved
src/Poly.jl Outdated Show resolved Hide resolved
@fingolfin
Copy link
Member Author

@lgoettgens improved it. note that lots of other things are broken for (m)poly/series/... rings over zero rings, e.g. isone(one(R)) frequently returns false, because their is_one method check for the degree being 0, but since one(R) == zero(R) it isn't.

This could be fixed at the price of making is_one slower for everyone. But more problems will crop up afterwards. E.g.:

julia> R = residue_ring(ZZ, 1)[1]
Residue ring of integers modulo 1

julia> S,t = R[:t]
(Univariate polynomial ring in t over R, 0)

julia> isone(one(S))
false

julia> t == t^1
false

julia> length(t)
0

julia> length(t^1)
2

Anyway I won't resolve that here. I am still tempted to say "zero rings as coefficient rings are verboten and either outright rejected or lead to undefined behaviors" ...

src/MatRing.jl Outdated Show resolved Hide resolved
@fingolfin fingolfin force-pushed the mh/is_finite branch 4 times, most recently from b639db9 to 45fef08 Compare October 10, 2024 08:55
Also add missing (but documented) `characteristic` method for
`FreeAssociativeAlgebra`
@fingolfin fingolfin enabled auto-merge (squash) October 10, 2024 09:38
@fingolfin fingolfin merged commit 9ebc781 into master Oct 10, 2024
28 of 30 checks passed
@fingolfin fingolfin deleted the mh/is_finite branch October 10, 2024 11:58
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.

2 participants