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.Mon, 04 Jan 2021 16:13:59 +0100inverse image under ring homomorphismhttps://ask.sagemath.org/question/55099/inverse-image-under-ring-homomorphism/Hi there!
Just starting to learn Sage and can't get why both `inverse_image` calls
below give an error saying the given element does not have a preimage,
while `y^2` clearly has `xbar` as preimage.
Referring to the generators of `R1` and `R2` explicitly doesn't help either.
sage: R.<x, y> = QQ[]
sage: R1 = R.quotient(R.ideal(y^2 - x^3))
sage: R2 = R.quotient(R.ideal(x))
sage: h = R1.hom([y^2, y^3], R2)
sage: h
Ring morphism:
From: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (-x^3 + y^2)
To: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x)
Defn: xbar |--> y^2
ybar |--> y^3
sage: h.inverse_image(y)
Traceback (most recent call last)
...
ValueError: element y does not have preimage
sage: h.inverse_image(y^2)
Traceback (most recent call last)
...
ValueError: element y^2 does not have preimage
Thanks!Mon, 04 Jan 2021 15:12:56 +0100https://ask.sagemath.org/question/55099/inverse-image-under-ring-homomorphism/Answer by rburing for <p>Hi there!</p>
<p>Just starting to learn Sage and can't get why both <code>inverse_image</code> calls
below give an error saying the given element does not have a preimage,
while <code>y^2</code> clearly has <code>xbar</code> as preimage.</p>
<p>Referring to the generators of <code>R1</code> and <code>R2</code> explicitly doesn't help either.</p>
<pre><code>sage: R.<x, y> = QQ[]
sage: R1 = R.quotient(R.ideal(y^2 - x^3))
sage: R2 = R.quotient(R.ideal(x))
sage: h = R1.hom([y^2, y^3], R2)
sage: h
Ring morphism:
From: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (-x^3 + y^2)
To: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x)
Defn: xbar |--> y^2
ybar |--> y^3
sage: h.inverse_image(y)
Traceback (most recent call last)
...
ValueError: element y does not have preimage
sage: h.inverse_image(y^2)
Traceback (most recent call last)
...
ValueError: element y^2 does not have preimage
</code></pre>
<p>Thanks!</p>
https://ask.sagemath.org/question/55099/inverse-image-under-ring-homomorphism/?answer=55102#post-id-55102Thanks for reporting this bug; it is now tracked at [trac ticket #31178](https://trac.sagemath.org/ticket/31178).
**Edit**: It was fixed on the same day, and the bugfix has since been merged into SageMath. The first beta that includes this fix is 9.3.beta6, which will be released soon.Mon, 04 Jan 2021 16:13:59 +0100https://ask.sagemath.org/question/55099/inverse-image-under-ring-homomorphism/?answer=55102#post-id-55102