ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 22 Apr 2016 23:29:53 -0500Assumption that n is positive integerhttp://ask.sagemath.org/question/33182/assumption-that-n-is-positive-integer/ I wrote
assume(n, 'integer')
assume(n>0)
assumptions()
Sage gave back
[n is integer, n > 0]
Yet the command
n.is_integer()
returned false. Also, the assumptions were not used in later computations. For example
gamma(-n)
did not return infinity.
Fri, 22 Apr 2016 04:52:02 -0500http://ask.sagemath.org/question/33182/assumption-that-n-is-positive-integer/Comment by paulmasson for <p>I wrote</p>
<pre><code>assume(n, 'integer')
assume(n>0)
assumptions()
</code></pre>
<p>Sage gave back</p>
<pre><code>[n is integer, n > 0]
</code></pre>
<p>Yet the command</p>
<pre><code>n.is_integer()
</code></pre>
<p>returned false. Also, the assumptions were not used in later computations. For example</p>
<pre><code>gamma(-n)
</code></pre>
<p>did not return infinity.</p>
http://ask.sagemath.org/question/33182/assumption-that-n-is-positive-integer/?comment=33202#post-id-33202Take a look at this question:
http://ask.sagemath.org/question/9465/check-that-variable-is-integer/Fri, 22 Apr 2016 23:29:53 -0500http://ask.sagemath.org/question/33182/assumption-that-n-is-positive-integer/?comment=33202#post-id-33202