-
-
Notifications
You must be signed in to change notification settings - Fork 701
Description
Currently, to construct a category of algebras, we need to specify the
base ring:
sage: Algebras(QQ)
A side effect is that the construction of e.g. GF(p)['x'] for a
lot of p's in number theoretic calculations triggers the
construction of many parallel hierarchies of categories.
This is a waste because in most situations only the category of the
base ring is relevant. In particular, the generic code provided to
parents/elements/... only depends on the latter.
The purpose of this ticket is to allow for only specifying the
category of the base ring, as in:
sage: Algebras(Fields())
with
sage: Algebras(QQ)
constructing a subcategory of the former. Then go trough the code,
decide in each case whether we want to use Algebras(QQ) or
Algebras(Fields()), and update the doctests accordingly. In most
case, the latter idiom will be preferable, unless we need some
operation on the category itself.
This would fix the regression noted on #15792 and made worse by
#10963.
Further features for this ticket or follow-up tickets would be to:
-
make
Modules(...)into a covariant functorial
constructions. This would give a proper framework for the feature
Modules(QQ)->VectorSpaces(QQ)instead of having to
tackle it with a special hack. -
implement a
PolynomialRings(...)covariant functorial
construction.
Depends on #10963
Depends on #16275
CC: @sagetrac-sage-combinat @vbraun @simon-king-jena @darijgr
Component: categories
Author: Nicolas M. Thiéry
Branch/Commit: 15658bd
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/15801