class sage.categories.sets_with_partial_maps.SetsWithPartialMaps(s=None)

Bases: sage.categories.category_singleton.Category_singleton

The category whose objects are sets and whose morphisms are maps that are allowed to raise a ValueError on some inputs.

This category is equivalent to the category of pointed sets, via the equivalence sending an object X to X union {error}, a morphism f to the morphism of pointed sets that sends x to f(x) if f does not raise an error on x, or to error if it does.


sage: SetsWithPartialMaps()
Category of sets with partial maps

sage: SetsWithPartialMaps().super_categories()
[Category of objects]


sage: TestSuite(SetsWithPartialMaps()).run()


sage: SetsWithPartialMaps().super_categories()
[Category of objects]

Previous topic

Sets With a Grading

Next topic

Unique factorization domains

This Page