AUTHORS:
- Florent Hivert (2009-11): initial revision.
Bases: sage.categories.category.Category
The category of infinite enumerated sets
An infinite enumerated sets is a countable set together with a canonical enumeration of its elements.
EXAMPLES:
sage: InfiniteEnumeratedSets()
Category of infinite enumerated sets
sage: InfiniteEnumeratedSets().super_categories()
[Category of enumerated sets]
sage: InfiniteEnumeratedSets().all_super_categories()
[Category of infinite enumerated sets,
Category of enumerated sets,
Category of sets,
Category of sets with partial maps,
Category of objects]
TESTS:
sage: C = InfiniteEnumeratedSets()
sage: TestSuite(C).run()
Counts the elements of the enumerated set.
EXAMPLES:
sage: NN = InfiniteEnumeratedSets().example()
sage: NN.cardinality()
+Infinity
Returns False since self is not finite.
EXAMPLES:
sage: C = InfiniteEnumeratedSets().example()
sage: C.is_finite()
False
Returns an error since self is an infinite enumerated set.
EXAMPLES:
sage: NN = InfiniteEnumeratedSets().example()
sage: NN.list()
...
NotImplementedError: infinite list
Returns an error since self is an infinite enumerated set.
EXAMPLES:
sage: NN = InfiniteEnumeratedSets().example()
sage: NN.random_element()
...
NotImplementedError: infinite set
TODO: should this be an optional abstract_method instead?
EXAMPLES:
sage: InfiniteEnumeratedSets().super_categories()
[Category of enumerated sets]