On 14 oct, 22:07, "D. Monarres" <[email protected]> wrote:
> Hello all,
>
> Just wondering if I am doing everything correctly or if I have
> stumbled onto a bug (or something that needs to be implemented)
>
> I am writing a tutorial for students using Sage in an introductory
> abstract algebra course and the following didn't work as expected:
>
> sage: R = Integers(5)
> sage: S = Integers(10)
> sage: phi = R.hom([6], S)
>
> I was hoping to construct the ring-homomorphism from Z5 to Z10 which
> takes 1 -> 6. However I get a "TypeError: images do not define a valid
> homomorphism"
>
> So am I not understanding how to construct this homomorphism, or is
> there something missing?

It seems to me that it is not possible.

If R and S are rings with unity, R.hom(S) creates a homomorphism of
commutative rings with one. Such morphisms have to verify that
phi(R(1)) = S(1) So you cannot define an homomorphism of Integers(5)
and Integers(10) as commutative rings with unity.

Anyway, trying around

{{{
sage: A=R.Hom(S)
sage: A
Set of Homomorphisms from Ring of integers modulo 5 to Ring of
integers modulo 10
sage: from sage.rings.morphism import RingHomomorphism_im_gens
sage: phi = RingHomomorphism_im_gens(A, [S(6)])
...
NotImplementedError: Verification of correctness of homomorphisms from
Ring of integers modulo 5 not yet implemented.
sage: phi = RingHomomorphism_im_gens(A, [S(6)], check = False)
sage: phi
Ring morphism:
  From: Ring of integers modulo 5
  To:   Ring of integers modulo 10
  Defn: 1 |--> 6
}}}

BUT

{{{
sage: phi(R(0))
0
sage: phi(R(1))
1
sage: phi(R(2))
2
sage: phi(R(3))
3
sage: phi(R(4))
4
sage: phi(R(5))
0
}}}

note that phi(R(1))=S(1)

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to