Finite sets - Category Framework

Skip to content
Back to top
View this page
Edit this page

# Finite sets

class sage.categories.finite_sets.FiniteSets(base_category)

  Bases: `CategoryWithAxiom_singleton`

  The category of finite sets.

  EXAMPLES:

  Sage

      sage: C = FiniteSets(); C
      Category of finite sets
      sage: C.super_categories()
      [Category of sets]
      sage: C.all_super_categories()
      [Category of finite sets,
       Category of sets,
       Category of sets with partial maps,
       Category of objects]
      sage: C.example()
      NotImplemented

  Python

      >>> from sage.all import *
      >>> C = FiniteSets(); C
      Category of finite sets
      >>> C.super_categories()
      [Category of sets]
      >>> C.all_super_categories()
      [Category of finite sets,
       Category of sets,
       Category of sets with partial maps,
       Category of objects]
      >>> C.example()
      NotImplemented

  class Algebras(category, *args)

    Bases: `AlgebrasCategory`

    extra_super_categories()

      EXAMPLES:

      Sage

          sage: FiniteSets().Algebras(QQ).extra_super_categories()
          [Category of finite dimensional vector spaces with basis over Rational Field]

      Python

          >>> from sage.all import *
          >>> FiniteSets().Algebras(QQ).extra_super_categories()
          [Category of finite dimensional vector spaces with basis over Rational Field]

      This implements the fact that the algebra of a finite set is finite dimensional:

      Sage

          sage: FiniteMonoids().Algebras(QQ).is_subcategory(AlgebrasWithBasis(QQ).FiniteDimensional())
          True

      [Python]

          >>> from sage.all import *
          >>> FiniteMonoids().Algebras(QQ).is_subcategory(AlgebrasWithBasis(QQ).FiniteDimensional())
          True

  class ParentMethods

    Bases: `object`

    is_finite()

      Return `True` since `self` is finite.

      EXAMPLES:

      Sage

          sage: C = FiniteEnumeratedSets().example()
          sage: C.is_finite()
          True

      Python

          >>> from sage.all import *
          >>> C = FiniteEnumeratedSets().example()
          >>> C.is_finite()
          True

  class SubcategoryMethods

    Bases: `object`

    Infinite()

      Incompatible axiom.

      EXAMPLES:

      Sage

          sage: P = Posets().Finite()
          sage: P.Infinite()
          Traceback (most recent call last):
          ...
          TypeError: incompatible axioms: finite and infinite

      Python

          >>> from sage.all import *
          >>> P = Posets().Finite()
          >>> P.Infinite()
          Traceback (most recent call last):
          ...
          TypeError: incompatible axioms: finite and infinite

  class Subquotients(category, *args)

    Bases: `SubquotientsCategory`

    extra_super_categories()

      EXAMPLES:

      Sage

          sage: FiniteSets().Subquotients().extra_super_categories()
          [Category of finite sets]

      Python

          >>> from sage.all import *
          >>> FiniteSets().Subquotients().extra_super_categories()
          [Category of finite sets]

      This implements the fact that a subquotient (and therefore a quotient or subobject) of a finite set is finite:

      Sage

          sage: FiniteSets().Subquotients().is_subcategory(FiniteSets())
          True
          sage: FiniteSets().Quotients   ().is_subcategory(FiniteSets())
          True
          sage: FiniteSets().Subobjects  ().is_subcategory(FiniteSets())
          True

      [Python]

          >>> from sage.all import *
          >>> FiniteSets().Subquotients().is_subcategory(FiniteSets())
          True
          >>> FiniteSets().Quotients   ().is_subcategory(FiniteSets())
          True
          >>> FiniteSets().Subobjects  ().is_subcategory(FiniteSets())
          True