[sage-support] Ring homomorphisms induced from the base ring?

4 views
Skip to first unread message

Simon King

unread,
Apr 28, 2010, 4:26:17 PM4/28/10
to sage-support
Hi!

Let R,S be rings and f:R-->S be a ring homomorphism. If R,S are base
rings of, e.g., matrix rings or polynomial rings, shouldn't it be
possible to construct the homomorphism of the "bigger" rings induced
by f? But how?

For example,
sage: R.<x> = QQ[]
sage: MS = MatrixSpace(R,2,2)
sage: P.<y> = R[]
sage: f = R.hom([2*x],R)
How does one create the endomorphisms of MS and P induced by f?

On a related note, how does one create a homomorphism of a Laurent
polynomial ring? I tried this:
sage: R.<x> = LaurentPolynomialRing(ZZ)
sage: f = R.hom([x],R)
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (4, 0))
...
TypeError: images do not define a valid homomorphism

So, can one even not create the identity morphism?

Best regards,
Simon

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

Simon King

unread,
Apr 29, 2010, 1:55:19 PM4/29/10
to sage-support
Whoever listens...

On 28 Apr., 22:26, Simon King <simon.k...@nuigalway.ie> wrote:
> Hi!
>
> Let R,S be rings and f:R-->S be a ring homomorphism. If R,S are base
> rings of, e.g., matrix rings or polynomial rings, shouldn't it be
> possible to construct the homomorphism of the "bigger" rings induced
> by f? But how?

Since there was no answer, I guess it isn't implemented yet. Perhaps
it works like this:

def my_map(f,x):
P = parent(x)
try:
return P([f(t) for t in x])
except TypeError:
return P([my_map(f,t) for t in x])

and then I get:

sage: R.<x> = ZZ[]
sage: f = R.hom([2*x],R)
sage: S.<y> = R[]
sage: p = S.random_element()
sage: p
(-x + 3)*y^2 + (-x^2 + x + 12)*y + 2*x^2 + x + 1
sage: my_map(f,p)
(-2*x + 3)*y^2 + (-4*x^2 + 2*x + 12)*y + 8*x^2 + 2*x + 1

and

sage: MS = MatrixSpace(R,2,2)
sage: M = MS.random_element()
sage: M
[9*x^2 + x + 1 -2*x^2 + 6*x]
[ x^2 + x - 17 x^2 - x - 3]
sage: my_map(f,M)
[36*x^2 + 2*x + 1 -8*x^2 + 12*x]
[4*x^2 + 2*x - 17 4*x^2 - 2*x - 3]

Do you think that the above makes sense to implement in the call
method of a new generic class, say, RingHomomorphism_from_basering,
whose instances would be created in S.hom(f,S) and MS.hom(f,MS)? Or
does anybody have a better idea?

Cheers,
Reply all
Reply to author
Forward
0 new messages