ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 26 Jul 2014 22:56:18 -0500how to get a ideal of Power Series Ringhttps://ask.sagemath.org/question/23579/how-to-get-a-ideal-of-power-series-ring/ K.<u> = PowerSeriesRing(GF(5,4)); K
I = K.ideal(u^2+3,u^12), I
When I run the above in sagecell, nothing appears.
How to get the ideal is_commutative or prime or max_ideal or principal?Fri, 25 Jul 2014 06:59:10 -0500https://ask.sagemath.org/question/23579/how-to-get-a-ideal-of-power-series-ring/Answer by slelievre for <pre><code>K.<u> = PowerSeriesRing(GF(5,4)); K
I = K.ideal(u^2+3,u^12), I
</code></pre>
<p>When I run the above in sagecell, nothing appears.</p>
<p>How to get the ideal is_commutative or prime or max_ideal or principal?</p>
https://ask.sagemath.org/question/23579/how-to-get-a-ideal-of-power-series-ring/?answer=23581#post-id-23581**What output does the Sage Cell Server give?**
- Any "side-effect output", obtained by instructions such as 'print' or 'show'
- followed by the result of the last command (if this command produces a result other than 'None').
**What happened in your example?**
The reason why nothing appeared when you evaluated your input in the Sage cell server is that your last instruction is just to define 'I', and this doesn't return anything.
I suppose your intention was to define I and then ask what is I. For this, you need to replace the comma by a semicolon, ie replace ",I" by "; I" in your last line!
The effect of having a comma instead of a semicolon is that it defined 'I' as the pair whose first element is the ideal, and second element is the complex number 'I' in the symbolic ring. (Because before your definition of 'I', the name 'I' already referred to that, which is its default definition in Sage). You could check that by adding a third line of input with just "I".
K.<u> = PowerSeriesRing(GF(5,4)); K
I = K.ideal(u^2+3,u^12), I
I
and you will see this output:
(Ideal (3 + u^2, u^12) of Power Series Ring in u over Finite Field of size 5,
I)
**How to transform your input to obtain the output you want**
You could input the following:
K.<u> = PowerSeriesRing(GF(5,4))
print 'K =', K
I = K.ideal(u^2+3,u^12)
print 'I =', I
and get the following output:
K = Power Series Ring in u over Finite Field of size 5
I = Ideal (3 + u^2, u^12) of Power Series Ring in u over Finite Field of size 5
**How to get information about the ideal, such as 'is_commutative' etc.**
You can then ask more about the ideal. Unfortunately, not many methods are implemented for ideals in power series rings, so you might get a bunch of "not implemented" errors.Fri, 25 Jul 2014 08:01:08 -0500https://ask.sagemath.org/question/23579/how-to-get-a-ideal-of-power-series-ring/?answer=23581#post-id-23581Comment by cjsh for <p><strong>What output does the Sage Cell Server give?</strong></p>
<ul>
<li>Any "side-effect output", obtained by instructions such as 'print' or 'show'</li>
<li>followed by the result of the last command (if this command produces a result other than 'None').</li>
</ul>
<p><strong>What happened in your example?</strong></p>
<p>The reason why nothing appeared when you evaluated your input in the Sage cell server is that your last instruction is just to define 'I', and this doesn't return anything.</p>
<p>I suppose your intention was to define I and then ask what is I. For this, you need to replace the comma by a semicolon, ie replace ",I" by "; I" in your last line!</p>
<p>The effect of having a comma instead of a semicolon is that it defined 'I' as the pair whose first element is the ideal, and second element is the complex number 'I' in the symbolic ring. (Because before your definition of 'I', the name 'I' already referred to that, which is its default definition in Sage). You could check that by adding a third line of input with just "I".</p>
<pre><code>K.<u> = PowerSeriesRing(GF(5,4)); K
I = K.ideal(u^2+3,u^12), I
I
</code></pre>
<p>and you will see this output:</p>
<pre><code>(Ideal (3 + u^2, u^12) of Power Series Ring in u over Finite Field of size 5,
I)
</code></pre>
<p><strong>How to transform your input to obtain the output you want</strong></p>
<p>You could input the following:</p>
<pre><code>K.<u> = PowerSeriesRing(GF(5,4))
print 'K =', K
I = K.ideal(u^2+3,u^12)
print 'I =', I
</code></pre>
<p>and get the following output:</p>
<pre><code>K = Power Series Ring in u over Finite Field of size 5
I = Ideal (3 + u^2, u^12) of Power Series Ring in u over Finite Field of size 5
</code></pre>
<p><strong>How to get information about the ideal, such as 'is_commutative' etc.</strong></p>
<p>You can then ask more about the ideal. Unfortunately, not many methods are implemented for ideals in power series rings, so you might get a bunch of "not implemented" errors.</p>
https://ask.sagemath.org/question/23579/how-to-get-a-ideal-of-power-series-ring/?comment=23599#post-id-23599thank master very much!
before I met nothing appears many times about ", ; next line,blank space"in sagenb,I didnot know what happens,now I understand!
Sat, 26 Jul 2014 21:45:20 -0500https://ask.sagemath.org/question/23579/how-to-get-a-ideal-of-power-series-ring/?comment=23599#post-id-23599Comment by slelievre for <p><strong>What output does the Sage Cell Server give?</strong></p>
<ul>
<li>Any "side-effect output", obtained by instructions such as 'print' or 'show'</li>
<li>followed by the result of the last command (if this command produces a result other than 'None').</li>
</ul>
<p><strong>What happened in your example?</strong></p>
<p>The reason why nothing appeared when you evaluated your input in the Sage cell server is that your last instruction is just to define 'I', and this doesn't return anything.</p>
<p>I suppose your intention was to define I and then ask what is I. For this, you need to replace the comma by a semicolon, ie replace ",I" by "; I" in your last line!</p>
<p>The effect of having a comma instead of a semicolon is that it defined 'I' as the pair whose first element is the ideal, and second element is the complex number 'I' in the symbolic ring. (Because before your definition of 'I', the name 'I' already referred to that, which is its default definition in Sage). You could check that by adding a third line of input with just "I".</p>
<pre><code>K.<u> = PowerSeriesRing(GF(5,4)); K
I = K.ideal(u^2+3,u^12), I
I
</code></pre>
<p>and you will see this output:</p>
<pre><code>(Ideal (3 + u^2, u^12) of Power Series Ring in u over Finite Field of size 5,
I)
</code></pre>
<p><strong>How to transform your input to obtain the output you want</strong></p>
<p>You could input the following:</p>
<pre><code>K.<u> = PowerSeriesRing(GF(5,4))
print 'K =', K
I = K.ideal(u^2+3,u^12)
print 'I =', I
</code></pre>
<p>and get the following output:</p>
<pre><code>K = Power Series Ring in u over Finite Field of size 5
I = Ideal (3 + u^2, u^12) of Power Series Ring in u over Finite Field of size 5
</code></pre>
<p><strong>How to get information about the ideal, such as 'is_commutative' etc.</strong></p>
<p>You can then ask more about the ideal. Unfortunately, not many methods are implemented for ideals in power series rings, so you might get a bunch of "not implemented" errors.</p>
https://ask.sagemath.org/question/23579/how-to-get-a-ideal-of-power-series-ring/?comment=23601#post-id-23601@cjsh: It's good that you understand more and more how Sage works. One more thing about ask-Sage: when you reply to someone's answer, do that in the form of a "comment", not in the form of a new "answer".Sat, 26 Jul 2014 22:56:18 -0500https://ask.sagemath.org/question/23579/how-to-get-a-ideal-of-power-series-ring/?comment=23601#post-id-23601