#15381: gens() can mean both module and algebra generators, confusing
morphism.pyx
-------------------------------------------------+-------------------------
Reporter: darij | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.2
Component: categories | Resolution:
Keywords: categories, gens, morphisms, | Merged in:
modules | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | Stopgaps:
Dependencies: #10963 |
-------------------------------------------------+-------------------------
Comment (by nthiery):
Replying to [comment:2 darij]:
> Battle plan:
>
> - Wait for #10963 to be merged.
>
> - Define `monoid_gens(self)`, `group_gens(self)`, `module_gens(self,
base_ring)`, `ring_gens(self)` and `algebra_gens(self, base_ring)`.
For the record: we already have `semigroup_generators`,
`monoid_generators`, `group_generators`, `algebra_generators`,
`basis`, etc. What we need is a more systematical use and
advertisement of them. In particular it should be made clear that gens
is nothing but a short hand for casual interactive use, and should
*not* be used in code.
`module_generators`, `algebra_generators` and the like need not take a
base ring, since they are relative to the distinguished choice of base
ring in the parent.
> - For every (relevant) category `C`, define a category-level method
`C.object_gens(object)` that calls `object.[whatever]_gens()` where
`[whatever]` is the name of the category.
>
> - Redefine `gens(self)` to only work in the case when `self` is DEFINED
by generators and relations: for example, if `self` is defined as a
polynomial ring (or a quotient thereof), then `gens(self)` should be the
(projections of the) indeterminates; but when `self` is (say) a group
algebra, `gens(self)` shouldn't be defined at all. For the sake of
deprecation, don't actually throw errors but rather return the old result
with a deprecation warning.
A weaker step would be to just define `gens` in each category as an
alias to the generators for this category. With that, gens would refer
to the most specific one. Nothing super robust, but sufficient for
interactive use.
By the way: it's best if all the '*_generators' methods would return
families.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/ticket/15381#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.