Skip to content

Define and provide coefficient_ring for series rings #2187

@fingolfin

Description

@fingolfin

In docs/src/series.md we may read:

## Functions for types and parents of series rings

```julia
base_ring(R::SeriesRing)
base_ring(a::SeriesElem)
```

Return the coefficient ring of the given series ring or series.

So here we actually specify what base_ring is, mathematically, contrary to how it used in the rest of AA sigh. And coefficient_ring is not supported.

I suggest we define coefficient_ring for series rings. For now we can just define

coefficient_ring(R::SeriesRing) = base_ring(R)
coefficient_ring_type(R::SeriesRing) = base_ring_type(R)

to make it work instantly, and then adjust the .md file to mention them.

However, the manual should keep mentioning base_ring because that's what we promised for a long time, and we can't change this promise now, so we should keep documenting it. We can, however, inserting language to the effect "we recommend using coefficient_ring to clearly express the intent, but base_ring will stay supported for this purpose".

If we want, we can then look into gradually changing our implementations to switch the roles of base_ring and coefficient_ring: we add "native" cleffificient_ring methods to all series rings in AA and Nemo (do we have any elsewhere?) -- by that I mean methods not defined in terms of base_ring. Then once this is complete, we can replace the delegation and instead define base_ring(R::SeriesRing) = coefficient_ring(R).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions