Ask Your Question

Kofi's profile - activity

2020-05-23 10:23:17 +0200 received badge  Popular Question (source)
2020-05-23 10:23:17 +0200 received badge  Notable Question (source)
2020-05-23 10:23:17 +0200 received badge  Famous Question (source)
2019-05-10 11:22:39 +0200 received badge  Famous Question (source)
2018-02-15 23:15:40 +0200 received badge  Popular Question (source)
2018-02-15 23:15:40 +0200 received badge  Notable Question (source)
2016-04-22 14:18:31 +0200 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 14:18:31 +0200 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?