Hey everyone,
    Currently we have the following behavior in Sage. This is okay:

sage: SGA4 = SymmetricGroupAlgebra(QQ, 4)
sage: SGA3 = SymmetricGroupAlgebra(QQ, 3)
sage: lift = SGA4.module_morphism(lambda x: SGA3.zero(), codomain=SGA3)
sage: SGA3.register_coercion(lift)

Now startup a new session:

sage: SGA4 = SymmetricGroupAlgebra(QQ, 4)
sage: SGA3 = SymmetricGroupAlgebra(QQ, 3)
sage: SGA3.has_coerce_map_from(SGA4)
False
sage: lift = SGA4.module_morphism(lambda x: SGA3.zero(), codomain=SGA3)
sage: SGA3.register_coercion(lift)
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-6-d757c9181cb9> in <module>()
----> 1 SGA3.register_coercion(lift)


/home/travis/sage/local/lib/python2.7/site-packages/sage/structure/parent.so 
in sage.structure.parent.Parent.register_coercion (build/cythonized/sage/
structure/parent.c:13361)()


/home/travis/sage/local/lib/python2.7/site-packages/sage/structure/parent.so 
in sage.structure.parent.Parent.register_coercion (build/cythonized/sage/
structure/parent.c:13271)()


AssertionError: coercion from Symmetric group algebra of order 4 over 
Rational Field to Symmetric group algebra of order 3 over Rational Field 
already registered or discovered

Darij and I have been bitten by this before, but we (at least I) thought 
this was the coercion model being extra cautious. However I'm working with 
Miguel Marco and Julian Rueth where Miguel's doing an implementation which 
has a subclass D of another class C and is trying to setup and coercion 
from an instance of D to C and it fails with the same method. We've 
narrowed it to _coerce_from_hash is not behaving as it should (in both 
cases, the hashes of the parents are different and == is false), and we've 
narrowed it down to lines 2351-2 in parent.pyx:

if (mor is not None) or _may_cache_none(self, S, "coerce"):
    self._coerce_from_hash.set(S,mor)

in that the morphism is None in this case. So what is the proper solution 
for this? Is there some way we can work around this?

Thanks,
Travis

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to