ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 17 Jun 2018 12:47:03 +0200Possible bug with identity morphismhttps://ask.sagemath.org/question/42625/possible-bug-with-identity-morphism/I have a number field `U` for which I consider its automorphisms through `Hom(U,U)`.
The identity `one=Hom(U,U).identity()` behaves weirdly under right multiplication:
U = CyclotomicField(3)
f = Hom(U,U)[1]
print f
print "--------------------"
one = Hom(U,U).identity()
print f*one
print "--------------------"
print one*f
print "--------------------"
print f*f
When I run this code, I expect `f` to be printed thrice, followed by the identity morphism.
However, while the first and third output do in fact both print `f`, the second prints
Composite map:
From: Cyclotomic Field of order 3 and degree 2
To: Cyclotomic Field of order 3 and degree 2
Defn: Identity endomorphism of Cyclotomic Field of order 3 and degree 2
then
Ring endomorphism of Cyclotomic Field of order 3 and degree 2
Defn: zeta3 |--> -zeta3 - 1
Is this a bug or is this this behaviour explained somewhere in the documentation?
MadPidgeonSun, 17 Jun 2018 12:47:03 +0200https://ask.sagemath.org/question/42625/