# Finite sets¶

class sage.categories.finite_sets.FiniteSets(base_category)

The category of finite sets.

EXAMPLES:

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


TESTS:

sage: TestSuite(C).run()
sage: C is Sets().Finite()
True

class Algebras(category, *args)

TESTS:

sage: from sage.categories.covariant_functorial_construction import CovariantConstructionCategory
sage: class FooBars(CovariantConstructionCategory):
...       _functor_category = "FooBars"
sage: Category.FooBars = lambda self: FooBars.category_of(self)
sage: C = FooBars(ModulesWithBasis(ZZ))
sage: C
Category of foo bars of modules with basis over Integer Ring
sage: C.base_category()
Category of modules with basis over Integer Ring
sage: latex(C)
\mathbf{FooBars}(\mathbf{ModulesWithBasis}_{\Bold{Z}})
sage: import __main__; __main__.FooBars = FooBars # Fake FooBars being defined in a python module
sage: TestSuite(C).run()

extra_super_categories()

EXAMPLES:

sage: 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: FiniteMonoids().Algebras(QQ).is_subcategory(AlgebrasWithBasis(QQ).FiniteDimensional())
True

class FiniteSets.ParentMethods
is_finite()

Return True since self is finite.

EXAMPLES:

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

class FiniteSets.Subquotients(category, *args)

TESTS:

sage: from sage.categories.covariant_functorial_construction import CovariantConstructionCategory
sage: class FooBars(CovariantConstructionCategory):
...       _functor_category = "FooBars"
sage: Category.FooBars = lambda self: FooBars.category_of(self)
sage: C = FooBars(ModulesWithBasis(ZZ))
sage: C
Category of foo bars of modules with basis over Integer Ring
sage: C.base_category()
Category of modules with basis over Integer Ring
sage: latex(C)
\mathbf{FooBars}(\mathbf{ModulesWithBasis}_{\Bold{Z}})
sage: import __main__; __main__.FooBars = FooBars # Fake FooBars being defined in a python module
sage: TestSuite(C).run()

extra_super_categories()

EXAMPLES:

sage: 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: FiniteSets().Subquotients().is_subcategory(FiniteSets())
True
sage: FiniteSets().Quotients   ().is_subcategory(FiniteSets())
True
sage: FiniteSets().Subobjects  ().is_subcategory(FiniteSets())
True


#### Previous topic

Finite semigroups

#### Next topic

Finite Weyl Groups