Sage: Ticket #26970: improve conversions from polynomial rings to the base ring
https://trac.sagemath.org/ticket/26970
<p>
This ticket is a follow up on <a class="needs_work ticket" href="https://trac.sagemath.org/ticket/26929" title="defect: Quotients of polynomials rings over boolean rings (needs_work)">#26929</a>. As pointed out there, conversions from univariate quotient rings to subrings of the base ring should be harmonized with those of multivariate quotient rings.
</p>
<p>
For example, we currently have the following:
</p>
<pre class="wiki">sage: R.<x,y> = QQ[]; S.<a,b> = R.quo(x^2 + y^2);
sage: ZZ.coerce_map_from(S) is None
True
sage: ZZ.convert_map_from(S)
Conversion via _integer_ method map:
From: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x^2 + y^2)
To: Integer Ring
</pre><p>
In the univariate case another map gets picked up; one that apparently always fails.
</p>
<pre class="wiki">sage: R.<x>=QQ[]; S.<a>=R.quo(x^2+1)
sage: m=ZZ.convert_map_from(S); m
Conversion map:
From: Univariate Quotient Polynomial Ring in a over Rational Field with modulus x^2 + 1
To: Integer Ring
</pre><p>
This map simply ends up calling <code>ZZ._element_constructor_(<argument>)</code>, which fails.
</p>
<p>
So the difference seems to be whether an <code>_integer_</code> method is available on the elements.
</p>
<p>
(not sure whether this belongs to coercion or categories, or neither.)
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/26970
Trac 1.1.6mantepseMon, 31 Dec 2018 20:58:09 GMT
https://trac.sagemath.org/ticket/26970#comment:1
https://trac.sagemath.org/ticket/26970#comment:1
<p>
Maybe the following is part of the problem:
</p>
<pre class="wiki">sage: R.<x,y> = PolynomialRing(QQ); S = R.quotient(x^2+y^2)
sage: R1.<x> = PolynomialRing(QQ); S1 = R1.quotient(x^2+x)
sage: S1 in Algebras(QQ)
True
sage: S in Algebras(QQ)
False
</pre><p>
I don't know yet how (and where) this should be fixed.
</p>
TicketembrayTue, 15 Jan 2019 18:15:21 GMTmilestone changed
https://trac.sagemath.org/ticket/26970#comment:2
https://trac.sagemath.org/ticket/26970#comment:2
<ul>
<li><strong>milestone</strong>
changed from <em>sage-8.6</em> to <em>sage-8.7</em>
</li>
</ul>
<p>
Retarging tickets optimistically to the next milestone. If you are responsible for this ticket (either its reporter or owner) and don't believe you are likely to complete this ticket before the next release (8.7) please retarget this ticket's milestone to sage-pending or sage-wishlist.
</p>
TicketembrayMon, 25 Mar 2019 10:56:15 GMTmilestone changed
https://trac.sagemath.org/ticket/26970#comment:3
https://trac.sagemath.org/ticket/26970#comment:3
<ul>
<li><strong>milestone</strong>
changed from <em>sage-8.7</em> to <em>sage-8.8</em>
</li>
</ul>
<p>
Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)
</p>
TicketembrayFri, 14 Jun 2019 14:54:19 GMTmilestone deleted
https://trac.sagemath.org/ticket/26970#comment:4
https://trac.sagemath.org/ticket/26970#comment:4
<ul>
<li><strong>milestone</strong>
<em>sage-8.8</em> deleted
</li>
</ul>
<p>
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).
</p>
Ticket