### Navigation

- index
- modules |
- next |
- previous |
- Category Theory »

# Infinite Enumerated Sets

AUTHORS:

> - Florent Hivert (2009-11): initial revision.

class `sage.categories.infinite_enumerated_sets.``InfiniteEnumeratedSets`(base_category)

  Bases: `sage.categories.category_with_axiom.CategoryWithAxiom_singleton`

  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, Category of infinite sets]
      sage: InfiniteEnumeratedSets().all_super_categories()
      [Category of infinite enumerated sets,
       Category of enumerated sets,
       Category of infinite sets,
       Category of sets,
       Category of sets with partial maps,
       Category of objects]

  TESTS:

      sage: C = InfiniteEnumeratedSets()
      sage: TestSuite(C).run()

  class `ParentMethods`
    `list`()

      Returns an error since self is an infinite enumerated set.

      EXAMPLES:

          sage: NN = InfiniteEnumeratedSets().example()
          sage: NN.list()
          Traceback (most recent call last):
          ...
          NotImplementedError: infinite list

    `random_element`()

      Returns an error since self is an infinite enumerated set.

      EXAMPLES:

          sage: NN = InfiniteEnumeratedSets().example()
          sage: NN.random_element()
          Traceback (most recent call last):
          ...
          NotImplementedError: infinite set

      TODO: should this be an optional abstract_method instead?

### Navigation

- index
- modules |
- next |
- previous |
- Category Theory »