Ask Your Question

Kofi's profile - activity

2020-05-23 03:23:17 -0500 received badge  Famous Question (source)
2020-05-23 03:23:17 -0500 received badge  Notable Question (source)
2020-05-23 03:23:17 -0500 received badge  Popular Question (source)
2019-05-10 04:22:39 -0500 received badge  Famous Question (source)
2018-02-15 16:15:40 -0500 received badge  Notable Question (source)
2018-02-15 16:15:40 -0500 received badge  Popular Question (source)
2016-04-22 07:18:31 -0500 asked a question 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.

2016-04-22 07:18:31 -0500 asked a question Assume that n is positive integer

It seems I cannot make Sage assume that the variable n is a positive integer.

var('n')
assume(n, 'integer')
assume(n>0)

In this code, the "n>0" overwrites the assumption that n is an integer. The command

n.is_integer()

returns false. How do I do this?