Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?