I wanted to define a set of all positive integer powers of 2, and I could determine whether a number is contained in the set.
When a set is a finite set and there are not many elements, it's not hard to do. We can form the set first and then determine whether the elements are included or not.
Because the set of all positive integer powers of 2 is an infinite set, or rather a countable set. I thought of using the positive type to define it.
map(type, [0, 4, -2], 'And'('positive', 'satisfies'(s -> type(log2(s), 'positive'))))
[false, true, false]
Interestingly, we find that the type of judgment condition is a function, whereas positive(or integer) are symbols.
whattype('And'('positive', 'satisfies'(s -> type(log2(s), 'positive'))));
So my question is how does Maple define integer types or positive integers or even real numbers? In other words if I don't use the positive integer type for the above question, can I define the set of all positive integer powers of 2.