Hi! Currently, I try to let *all* homsets use Parent.__call__, so that there is a chance to make them use the new coercion model. I think I need some advise.
Is there a ticket about it? Could actually be that I or someone else tried to do the same in sage-3.x.y, but I guess it would make sense to start from scratch. Observation: There doesn't seem to be a real difference between sage.categories.map.Map and sage.categories.morphism.Morphism. Domain and codomain of a map or morphism are cdefined as Parent. But if I recall correctly, a Parent is an object of some category, that additionally has elements. And by definition, a category provides morphims also in the cases where the objects are no parents, i.e., do not contain elements. Do you agree that domain and codomain of Map/Morphism should be defined as CategoryObject, not as Parent? This is relevant in sage.homology. In this part of Sage, several types of complexes are defined: cell complexes, simplicial complexes, cubical complexes, chain complexes. They currently are derived from SageObject, which is very low in Sage's class hierarchy. To the very least, they should inherit from CategoryObject, so that it makes sense to consider them as object in a category, and apply morphisms. One should eventually also implement categories of cell complexes, simplicial complexes, cubical compleses, delta complexes and chain complexes---but how would these be related (in terms of super categories, I mean)? A further complication: Do these CategoryObjects qualify as parents, i.e., do they have elements? It seems that simplices are considered elements of simplicial complexes (at least, this is what simplicial complex morphisms are applied to). In contrast, ChainComplexMorphism does not seem to be called on anything (there is not a single test in sage.homology.chain_complex_morphism where a morphism is applied). However, Simplex again inherits from SageObject, not from Element, and the current comparison of simplices does not take into account what complexes the two to be compared simplices belong to. What do you think: Should we turn Simplex into a proper element class for simplicial complexes? Moreover, the complexes in sage.homology want to use base rings. Parent provides the possibility to define a base (which could be used as base_ring), so that it might make sense to use Parent even for those complexes for which we do not want to define elements. Or should we keep a custom base ring implementation, independent of Parent? A practical problem is that I don't see an obvious way to split this into sub-tasks. E.g., by the new coercion model, we want to have _element_constructor_, not __call__. But since different homsets in Sage inherit from each other, all __call__ methods must be replaced at once, resulting in a big change / patch bomb. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.