# Revision history [back]

### How th work with enumerable and infinite set

Hello,

I am trying to do following: Set B is the difference between QQ and the set of the prime numbers. B is a enumerable and infinite set. In Sage I put in the cells following expressions:

X = Set(QQ) Y = Set(Primes()) B=Set(X.difference(Y)) B.cardinality()

then I press evaluate. I am expecting that teh cardinality of B is +Infinity.

But Sage does not bring any result.

I tried this also initializing B like B = InfiniteEnumeratedSets(RR).

Could anybody please give me a hint what I am doing wrong?

Thank you very much and regards.

vbk

 2 retagged tmonteil 23843 ●26 ●172 ●438 http://wiki.sagemath.o...

### How th work with enumerable and infinite set

Hello,

I am trying to do following: Set B is the difference between QQ and the set of the prime numbers. B is a enumerable and infinite set. In Sage I put in the cells following expressions:

X = Set(QQ) Y = Set(Primes()) B=Set(X.difference(Y)) B.cardinality()

then I press evaluate. I am expecting that teh cardinality of B is +Infinity.

But Sage does not bring any result.

I tried this also initializing B like B = InfiniteEnumeratedSets(RR).

Could anybody please give me a hint what I am doing wrong?

Thank you very much and regards.

vbk

 3 No.3 Revision vdelecroix 6922 ●16 ●75 ●150 http://www.labri.fr/pe...

### How th work with enumerable and infinite set

Hello,

I am trying to do following: Set following: construct the set B that is the difference between QQ and the set of the prime numbers. numbers (note that B is a enumerable and infinite set. In Sage countable set). Within Sage, I put in tried the cells following expressions:following

X = Set(QQ)
Y = Set(Primes())
B=Set(X.difference(Y))
B.cardinality()B = Set(X.difference(Y))
B.cardinality()


then I press evaluate. evaluate. I am expecting that teh the cardinality of B is +Infinity.

+Infinity. But Sage does not bring any result.

I tried this also initializing B like like

B = InfiniteEnumeratedSets(RR).InfiniteEnumeratedSets(RR).


Could anybody please give me a hint what I am doing wrong?

Thank you very much and regards.

vbk