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.Fri, 01 Mar 2013 06:05:35 +0100Extension/coercion of finite rings & fieldshttps://ask.sagemath.org/question/9864/extensioncoercion-of-finite-rings-fields/Hi ...
again harping on my theme of p-adics: here is a characteristic-p toy model of the problem I had [here](http://ask.sagemath.org/question/2309/solving-polynomial-equations-over-p-adic-fields). Will someone please tell me how to do what this code is trying to do?!!
sage: K.<X> = GF(3^2,name='X'); # creates (residue) field which is GF(3)[X]
sage: R = IntegerModRing(3^2)[X]; # extends Z/p^2 by that same X to form quadratic extn - seemingly successfully
sage: print R(X+5); # I try to use X but it still treats it like an "alien" quantity in R ....
thanks!!Thu, 28 Feb 2013 16:18:17 +0100https://ask.sagemath.org/question/9864/extensioncoercion-of-finite-rings-fields/Answer by fidbc for <p>Hi ... </p>
<p>again harping on my theme of p-adics: here is a characteristic-p toy model of the problem I had <a href="http://ask.sagemath.org/question/2309/solving-polynomial-equations-over-p-adic-fields">here</a>. Will someone please tell me how to do what this code is trying to do?!!</p>
<pre><code>sage: K.<X> = GF(3^2,name='X'); # creates (residue) field which is GF(3)[X]
sage: R = IntegerModRing(3^2)[X]; # extends Z/p^2 by that same X to form quadratic extn - seemingly successfully
sage: print R(X+5); # I try to use X but it still treats it like an "alien" quantity in R ....
</code></pre>
<p>thanks!!</p>
https://ask.sagemath.org/question/9864/extensioncoercion-of-finite-rings-fields/?answer=14612#post-id-14612Sorry my previous answer was completely wrong.
Perhaps if you use
sage: y=R.gen()
and then
sage: R(y+5)
X+5
Thu, 28 Feb 2013 17:46:35 +0100https://ask.sagemath.org/question/9864/extensioncoercion-of-finite-rings-fields/?answer=14612#post-id-14612Comment by GaryMak for <p>Sorry my previous answer was completely wrong.</p>
<p>Perhaps if you use</p>
<pre><code>sage: y=R.gen()
</code></pre>
<p>and then</p>
<pre><code>sage: R(y+5)
X+5
</code></pre>
https://ask.sagemath.org/question/9864/extensioncoercion-of-finite-rings-fields/?comment=18131#post-id-18131Thank you very much. That certainly solves that problem - I'm now up to the next level of incomprehensibility at least!!Fri, 01 Mar 2013 06:05:35 +0100https://ask.sagemath.org/question/9864/extensioncoercion-of-finite-rings-fields/?comment=18131#post-id-18131