Map from S.base() to S?

17 views
Skip to first unread message

Jeroen Demeyer

unread,
Nov 27, 2017, 4:02:51 AM11/27/17
to sage-support
I might be missing something, but is there a generic recipe in Sage to
get a map from S.base() to S? I want something which works in as much
generality as possible for any structure S. I feel like that should
exist but I couldn't find it.

Simon King

unread,
Nov 27, 2017, 4:15:07 AM11/27/17
to sage-s...@googlegroups.com
Hi Jeroen,
sage: R.<a,b>=QQ[]
sage: R.from_base_ring?

Not sure if this answers your question, as this isn't a map but a
conversion method.

Other than that, if you really want the result as a map, just exploit
the coercion/conversion framework:

sage: R.convert_map_from(R.base())
Polynomial base injection morphism:
From: Rational Field
To: Multivariate Polynomial Ring in a, b over Rational Field

I suppose you know the difference between a coercion and a conversion
map, and you know that in a non-unital algebra (which I think aren't
implemented in Sage) a conversion from the base ring doesn't really
make sense.

Best regards,
Simon

Jeroen Demeyer

unread,
Nov 27, 2017, 4:40:37 AM11/27/17
to sage-s...@googlegroups.com
Thanks!
Reply all
Reply to author
Forward
0 new messages