# Question:Principles of type definition for infinite sets in maple

## Question:Principles of type definition for infinite sets in maple

Maple 2021

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.

S:={seq(2^i,i=1..100)}:
is(64,S);
is(-3,S);

true

false

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'))));
whattype(positive);
whattype(integer);

function

symbol

symbol

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.

﻿