If I have a simple variable, I can specify the assumptions or type as follows:
import sympy as sy
k = sy.Symbol('k', integer=True)
assert k.is_integer
assert k.is_real
What if I want to do the the same for an IndexedBase
or a Function
:
f = sy.Function('f', integer=True)
t = sy.Symbol('t')
assert f(t).is_integer # AssertionError
from sympy.tensor import IndexedBase, Idx
i = Idx('i')
A = IndexedBase('A', integer=True)
# __new__() got an unexpected keyword argument 'integer'
assert A[i].is_integer
But neither of these work. Is this possible?