You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently (and even with #10668), there is a generic call method for homsets that is not really useful, as it does not make any use of element classes or other ingredients of the "usual" framework for making a parent callable. In particular, homsets typically override __call__, which means that we can not benefit from a generic coercion model.
This ticket aims at providing a generic call method for homsets (similarly to what we have for parents) and use it in all concrete implementations of homsets.
A comment from #10668, what Nicolas would like to have:
For A a parent, A.hom(on_basis = [data],...) would call A.morphism_on_basis(data,...). This morphism_on_basis could
typically be implemented in A, or in C.ParentMethods for C the
category of A.
There are 5-6 explicit hom functions in Sage that would need to be
generalized to accept this syntax, while keeping backward
compatibility if no keyword is specified.
I am not totally sure whether I would like that change. The A.hom(data, B) method should, in my opinion, be a short-cut for A.Hom(B)(data), and it should be the responsibility of the homset to process the data (by means of _element_constructor_). I would like to have everything as close to what we have for parents as possible. So, _element_constructor_ and friends should be used.
Currently (and even with #10668), there is a generic call method for homsets that is not really useful, as it does not make any use of element classes or other ingredients of the "usual" framework for making a parent callable. In particular, homsets typically override
__call__
, which means that we can not benefit from a generic coercion model.This ticket aims at providing a generic call method for homsets (similarly to what we have for parents) and use it in all concrete implementations of homsets.
Depends on #10668
CC: @nthiery @jpflori
Component: coercion
Issue created by migration from https://trac.sagemath.org/ticket/17150
The text was updated successfully, but these errors were encountered: