I have looked into some of the issues and TODOs discussed in #14711, and
put my thoughts under #37705. In particular, to merge `SchemeMorphism`
with `Morphism` (or at least make SchemeMorphism inherit from Morphism),
I think the coercion model should be tweaked, so opinions from experts
are very much needed. In particular, the current (heuristic) algorithm
for `cm.discover_action` behaves badly when there is a "type diamond" (a
terminology borrowed from Lean), i.e. multiple type inheritance. Take
this for example,
SageObject (coercion model)
^ ^
| |
/ Map
/ \
ModuleElement Morphism
^ ^
\ /
\ /
SchemeMorphism
The coercion model has a special path for multiplying ModuleElement by
another Element, meaning the operation defined in Morphism/Map will be
ignored, which is undesirable since well a SchemeMorphism should be more
like a morphism not a module element I guess
(Sorry for the spam on Easter holidays)
On 01/04/2024 04:34, Gareth Ma wrote:
I'm currently working on stuff related to `EllipticCurveHom` and
`SchemeMorphism` at #37705. While working on it, I realised there's a
fundamental difference between the two `EllipticCurveHom` inherits
from `sage.categories.morphism.Morphism`, while `SchemeMorphism`
inherits from `sage.schemes.generic.morphism.SchemeMorphism`, and no
neither inherits from the other. Tracing back, there's this TODO:
```
.. TODO::
For historical reasons, :class:`SchemeMorphism` copies code from
:class:`~sage.categories.map.Map` rather than inheriting from it.
Proper inheritance should be used instead. See :issue:`14711`.
```
I tried reading through the thread of #14711, but it's quite hard to
understand, since I don't have background in the structural part of
Sage. I don't even understand how the title "Weak references in the
coercion graph" relate to the problem. Does anyone know about this
issue? (It seems at least three participants are still active in Sage
dev.) Can this be resolved in 2024?
/This is not an April-Fools joke./
Best regards,
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/3a2fc1fc-9d13-4ddc-9703-e7eedb22ae74%40gmail.com.