AbstractAlgebra.jl icon indicating copy to clipboard operation
AbstractAlgebra.jl copied to clipboard

`base_ring` vs `coefficient_ring`: methods and documentation

Open matthias314 opened this issue 3 years ago • 1 comments

AbstractAlgebra provides the functions base_ring and coefficient_ring. Sometimes they are both defined and synonymous:

julia> R, x = ZZ['x']; base_ring(R), coefficient_ring(R)
(Integers, Integers)

For types different from rings and algebras, however, only base_ring seems to be defined. Example:

julia> M = FreeModule(ZZ, 3); base_ring(M)
Integers

julia> coefficient_ring(M)
ERROR: MethodError: no method matching coefficient_ring(::AbstractAlgebra.Generic.FreeModule{BigInt})

(For me, coefficient_ring would be the more intuitive terminology in this case.) Is this intended behavior?

Also, the documentation for base_ring is very short. The function is mentioned on the page Ring Interface, but for instance not on the page Module Interface. For coefficient_ring I couldn't find any documentation. Is it maybe deprecated?

matthias314 avatar Aug 10 '22 19:08 matthias314

I agree that we should add it. I started a discussion over at https://github.com/oscar-system/Oscar.jl/issues/1505, since it has to be coordinated with some other packages.

thofma avatar Aug 11 '22 06:08 thofma