# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Make an abstract model of a functor (i.e. a homomorphism between abstract categories)

Contributed by:
Jonathan Gorard

ResourceFunction["AbstractFunctor"][ makes an abstract functor whose domain is the abstract category | |

ResourceFunction["AbstractFunctor"][ makes an abstract functor by applying the function | |

ResourceFunction["AbstractFunctor"][False,…] makes a contravariant version of the specified abstract functor. | |

ResourceFunction["AbstractFunctor"][ makes an abstract functor using the association of covariance/contravariance flag, initial abstract category, object mappings, arrow mappings, new objects, new arrows, new composition symbol, new identity symbol, new object equivalences and new morphism equivalences | |

ResourceFunction["AbstractFunctor"][ResourceFunction["AbstractFunctor"][…], makes a new abstract functor from an old functor by imposing new composition symbol | |

ResourceFunction["AbstractFunctor"][…][AbstractCategory[…]] applies an abstract functor to the specified abstract category. |

A functor between two categories is a mapping that associates every object in the domain category to a corresponding object in the codomain category, as well as every morphism in the domain category to a corresponding morphism in the codomain category, in such a way that the sources and targets of morphisms are respected by this map, identity morphisms on objects in the domain category are mapped to the identity morphisms on the corresponding objects in the codomain category, and compositions of morphisms in the domain category are mapped to compositions of the corresponding morphisms in the codomain category. In this way, a functor can be thought of as a homomorphism between categories (in that it generalizes the standard algebraic notion of homomorphism between monoids, groups, rings, etc. to the case of categories containing more than one object).

A map between categories that preserves the composition and identity conditions is often referred to as possessing the property of *functoriality*.

Though the definition given above applies to the case of *covariant* functors, there are also *contravariant* functors which have the effect of swapping the sources and targets of morphisms around and reversing the direction of composition. Contravariant functors may therefore be thought of as covariant functors defined over the dual/opposite category.

Functors capture many familiar constructions from mathematics such as presheaves (contravariant functors from the category of open sets in a topological space to the category of sets), power sets (covariant or contravariant functors from the category of sets to itself), dual vector spaces (contravariant functors from the category of vector spaces over a fixed field to itself), fundamental groups (covariant functors from the category of pointed topological spaces to the category of groups), group actions (covariant functors from a single-object groupoid to the category of sets), group representations (covariant functors from a single-object groupoid to the category of vector spaces), tensor products (covariant two-argument functors from the category of vector spaces to itself), tangent/cotangent bundles (covariant/contravariant functors from the category of differentiable manifolds to the category of vector bundles), etc., and generalize them to arbitrary categories. Indeed, every category-theoretic diagram can be thought of as a covariant functor from some (usually finite) index category to an arbitrary category.

An abstract presentation of a functor can therefore be given in terms of an initial abstract category (the domain), collections of mappings between objects and arrows in the underlying abstract quiver, collections of new objects and arrows to add to the codomain category, a new composition symbol and a new identity symbol for the codomain category, and collections of new relations between objects and morphisms (effectively specifying which objects and morphisms in the codomain category may be treated as equivalent).

ResourceFunction["AbstractFunctor"] supports the specification of abstract functors either by an initial abstract category together with eight lists/associations/symbols (an association of mappings between objects *map*_{ob}, an association of mappings between arrows *map*_{arr}, a list of new objects *new*_{ob}, an association of new arrows *new*_{arr}, a new composition symbol *comp*, a new identity symbol *id*, a list of new object equivalences *eq*_{ob} and a list of new morphism equivalences *eq*_{mor}), by an arbitrary function *func* (applied to a specified initial abstract category) or by an explicit association of the form <|"Covariant"→*cov*,"Category"→*cat*,"ObjectMappings"→*map*_{ob},"ArrowMappings"→*map*_{arr},"NewObjects"→*new*_{ob},"NewArrows"→*new*_{arr},"NewCompositionSymbol"→*comp*,"NewIdentitySymbol"→*id*,"ObjectEquivalences"→*eq*_{ob},"MorphismEquivalences"→*eq*_{mor}|>.

An abstract category object can be generated using the resource function AbstractCategory.

Where specified, the new composition symbol *comp* should be a binary operator and the new identity symbol *id* should be a unary operator.

When specifying an abstract functor by a collection of lists/associations/symbols, ResourceFunction["AbstractFunctor"] allows one to omit either the association of object mappings, the association of arrow mappings, the list of new objects, the association of new arrows, the new composition symbol, the new identity symbol, the list of new object equivalences or the list of new morphism equivalences (or some combination of the above). When the object mappings association is omitted, every object in the domain category is assumed to map to itself; likewise, when the arrow mappings association is omitted, every arrow in the underlying quiver of the domain category is assumed to map to itself. When the list of new objects or the association of new arrows is omitted, they are assumed to be empty (i.e. no new objects/arrows are created). When the new composition or identity symbol is omitted, they are assumed to be the same as the composition and identity symbols in the domain category. When lists of either new object equivalences or new morphism equivalences are omitted, they are assumed to be empty (i.e. no new equivalences between objects/morphisms are imposed in the codomain category).

Note that abstract functor specifies mappings at the level of arrows in the underlying abstract quiver, rather than mappings between the morphisms of the categories themselves; this is because the specification of mappings between the underlying arrows is sufficient to determine the functor fully, since all other mappings between morphisms can subsequently be deduced from the properties of composition and identity in the underlying category (which are necessarily preserved by virtue of functoriality).

By default, all object and morphism equivalences in the domain category will be respected by the application of an abstract functor (i.e. the equivalences between objects and morphisms in the domain category will be mapped to equivalences between the corresponding objects and morphisms in the codomain category, together with any new equivalences imposed by the abstract functor itself).

The codomain category may be strictly larger (if sufficiently many new objects and new arrows are introduced), strictly smaller (if sufficiently many new equivalences between objects and morphisms are introduced), or the same size as the domain category.

If the function succeeds in constructing the specified abstract functor, it will return an ResourceFunction["AbstractFunctor"] expression.

ResourceFunction["AbstractFunctor"] expressions can be applied directly to AbstractCategory expressions, in which case a new AbstractCategory expression will be created by applying the specified object and arrow mappings, creating the specified new objects and arrows, introducing the specified composition and identity symbols and imposing the specified object and morphism equivalences to the old AbstractCategory. When the input AbstractCategory is the domain category of the ResourceFunction["AbstractFunctor"], then this will simply return the corresponding codomain category.

In ResourceFunction["AbstractFunctor"], the following properties are supported:

"ObjectCount" | number of objects in the domain category vs. the codomain category of the abstract functor |

"MorphismCount" | number of morphisms in the domain category vs. the codomain category of the abstract functor |

"ObjectEquivalences" | list of equivalences between objects in the codomain category imposed by the abstract functor |

"ObjectEquivalenceCount" | number of equivalences between objects in the codomain category imposed by the abstract functor |

"MorphismEquivalences" | list of equivalences between morphisms in the codomain category imposed by the abstract functor |

"MorphismEquivalenceCount" | number of equivalences between morphisms in the codomain category imposed by the abstract functor |

"ReducedObjectCount" | number of objects in the domain category vs. the codomain category of the abstract functor modulo all object equivalences |

"ReducedMorphismCount" | number of morphisms in the domain category vs. the codomain category of the abstract functor modulo all morphism/object equivalences |

"CompositionSymbol" | symbol used to denote morphism composition in the domain category vs. the codomain category (should be a binary operator in both cases) |

"IdentitySymbol" | symbol used to denote identity morphisms on objects in the domain category vs. the codomain category (should be a unary operator in both cases) |

"NewObjects" | list of new objects in the codomain category that have no counterpart in the domain category of the abstract functor |

"NewObjectCount" | number of new objects in the codomain category that have no counterpart in the domain category of the abstract functor |

"ReducedNewObjects" | list of new objects in the codomain category that have no counterpart in the domain category of the abstract functor, modulo all object equivalences |

"ReducedNewObjectCount" | number of new objects in the codomain category that have no counterpart in the domain category of the abstract functor, modulo all object equivalences |

"NewArrows" | association of new arrows in the underlying quiver of the codomain category that have no counterpart in the underlying quiver of the domain category of the abstract functor |

"NewArrowCount" | number of new arrows in the underlying quiver of the codomain category that have no counterpart in the underlying quiver of the domain category of the abstract functor |

"NewMorphisms" | association of new morphisms in the codomain category that have no counterpart in the domain category of the abstract functor |

"NewMorphismCount" | number of new morphisms in the codomain category that have no counterpart in the domain category of the abstract functor |

"ReducedNewMorphisms" | association of new morphisms in the codomain category that have no counterpart in the domain category of the abstract functor, modulo all morphism/object equivalences |

"ReducedNewMorphismCount" | number of new morphisms in the codomain category that have no counterpart in the domain category of the abstract functor, modulo all morphism/object equivalences |

"ObjectMappings" | association of mappings between objects in the domain category and corresponding objects in the codomain category of the abstract functor |

"ObjectMappingCount" | number of mappings between objects in the domain category and corresponding objects in the codomain category of the abstract functor |

"ReducedObjectMappings" | association of mappings between objects in the domain category and corresponding objects in the codomain category of the abstract functor, modulo all object equivalences |

"ReducedObjectMappingCount" | number of mappings between objects in the domain category and corresponding objects in the codomain category of the abstract functor, modulo all object equivalences |

"ArrowMappings" | association of mappings between arrows in the underlying quiver of the domain category and corresponding arrows in the underlying quiver of the codomain category of the abstract functor |

"ArrowMappingCount" | number of mappings between arrows in the underlying quiver of the domain category and corresponding arrows in the underlying quiver of the codomain category of the abstract functor |

"MorphismMappings" | association of mappings between morphisms in the domain category and corresponding morphisms in the codomain category of the abstract functor |

"MorphismMappingCount" | number of mappings between morphisms in the domain category and corresponding morphisms in the codomain category of the abstract functor |

"ReducedMorphismMappings" | association of mappings between morphisms in the domain category and corresponding morphisms in the codomain category of the abstract functor, modulo all morphism/object equivalences |

"ReducedMorphismMappingCount" | number of mappings between morphisms in the domain category and corresponding morphisms in the codomain category of the abstract functor, modulo all morphism/object equivalences |

"DomainCategory" | domain of the abstract functor, represented as an abstract category |

"CodomainCategory" | codomain of the abstract functor, represented as an abstract category |

"EndofunctorQ" | whether the abstract functor is an endofunctor (i.e. a functor from an abstract category to itself) |

"IdentityFunctorQ" | whether the abstract functor is an identity functor (i.e. an endofunctor that maps every object to itself and every morphism to itself) |

"ConstantFunctorQ" | whether the abstract functor is a constant functor/selection functor (i.e. a functor mapping every object to some fixed object in the codomain category, and every morphism to the identity morphism on that fixed object) |

"FullFunctorQ" | whether the abstract functor is full (i.e. a surjective function mapping sets of morphisms between pairs of objects in the domain category to corresponding sets of morphisms between corresponding pairs of objects in the codomain category) |

"FaithfulFunctorQ" | whether the abstract functor is faithful (i.e. an injective function mapping sets of morphisms betwen pairs of objects in the domain category to corresponding sets of morphisms between corresponding pairs of objects in the codomain category) |

"FullyFaithfulFunctorQ" | whether the abstract functor is fully faithful (i.e. a bijective function mapping sets of morphisms between pairs of objects in the domain category to corresponding sets of morphisms between corresponding pairs of objects in the codomain category) |

"InjectiveOnObjectsQ" | whether the abstract functor is injective on objects (i.e. an injective function mapping the object set of the domain category to the object set of the codomain category) |

"EssentiallyInjectiveFunctorQ" | whether the abstract functor is essentially injective on objects (i.e. an injective function up to isomorphism mapping the object set of the domain category to the object set of the codomain category) |

"SurjectiveOnObjectsQ" | whether the abstract functor is surjective on objects (i.e. a surjective function mapping the object set of the domain category to the object set of the codomain category) |

"EssentiallySurjectiveFunctorQ" | whether the abstract functor is essentially surjective on objects (i.e. a surjective function up to isomorphism mapping the object set of the domain category to the object set of the codomain category) |

"BijectiveOnObjectsQ" | whether the abstract functor is bijective on objects (i.e. a bijective function mapping the object set of the domain category to the object set of the codomain category) |

"EssentiallyBijectiveFunctorQ" | whether the abstract functor is essentially bijective on objects (i.e. a bijective function up to isomorphism mapping the object set of the domain category to the object set of the codomain category) |

"ConservativeFunctorQ" | whether the abstract functor is conservative (i.e. a morphism in the codomain category being an isomorphism implies that the corresponding morphism in the domain category is also an isomorphism) |

"EquivalenceFunctorQ" | whether the abstract functor yields an equivalence of categories (i.e. the functor is fully faithful and essentially surjective) |

"FiberCategories" | association of fibers/fiber categories for each object in the codomain category of the abstract functor (i.e. objects/morphisms in the domain category that project onto the specified object/identity morphism in the codomain category) |

"ReducedFiberCategories" | association of fibers/fiber categories for each object in the codomain category of the abstract functor (i.e. objects/morphisms in the domain category that project onto the specified object/identity morphism in the codomain category), modulo all morphism/object equivalences |

"DiscreteFibrationQ" | whether the abstract functor corresponds to a discrete fibration (a special case of a Grothendieck fibration) |

"InclusionFunctorQ" | whether the abstract functor corresponds to an inclusion functor for a subcategory (i.e. whether the objects/morphisms in the domain category form a subset of the objects/morphisms in the codomain category) |

"FullInclusionFunctorQ" | whether the abstract functor corresponds to a full inclusion functor for a subcategory (i.e. an inclusion functor that is also a full functor) |

"EmbeddingFunctorQ" | whether the abstract functor corresponds to an embedding functor (i.e. a functor that is both faithful and injective on objects) |

"FullEmbeddingFunctorQ" | whether the abstract functor corresponds to a full embedding functor (i.e. a functor that is both fully faithful and injective on objects) |

"SwapVariance" | returns a contravariant version of the abstract functor if it was originally covariant (and likewise a covariant version if it was originally contravariant) |

"CovariantFunctorQ" | whether the abstract functor is covariant (i.e. preserves the sources/targets of morphisms and the direction of morphism composition) |

"ContravariantFunctorQ" | whether the abstract functor is contravariant (i.e. swaps the sources/targets of morphisms and reverses the direction of morphism composition) |

"FullLabeledGraph" | abstract functor represented as a map between directed graphs with labels on the morphisms |

"FullUnlabeledGraph" | abstract functor represented as a map between directed graphs with no labels on the morphisms |

"ReducedLabeledGraph" | abstract functor represented as a map between directed graphs, modulo the lists of morphism/object equivalences, with labels on the morphisms |

"ReducedUnlabeledGraph" | abstract functor represented as a map between directed graphs, modulo the lists of morphism/object equivalences, with no labels on the morphisms |

"SimpleLabeledGraph" | abstract functor represented as a map between directed graphs, with self-loops and multiedges removed, with labels on the morphisms |

"SimpleUnlabeledGraph" | abstract functor represented as a map between directed graphs, with self-loops and multiedges removed, with no labels on the morphisms |

"ReducedSimpleLabeledGraph" | abstract functor represented as a map between directed graphs, with self-loops and multiedges removed, modulo the lists of morphism/object equivalences, with labels on the morphisms |

"ReducedSimpleUnlabeledGraph" | abstract functor represented as a map between directed graphs, with self-loops and multiedges removed, modulo the lists of morphism/object equivalences, with no labels on the morphisms |

"AssociationForm" | abstract functor represented as an association of covariance/contravariance flag, initial abstract category, object mappings, arrow mappings, new objects, new arrows, new composition symbol, new identity symbol, new object equivalences and new morphism equivalences |

"Properties" | list of properties |

Construct a simple abstract functor from an abstract category and a pair of associations designating object/arrow mappings:

In[1]:= |

Out[1]= |

In[2]:= |

Out[2]= |

Show the full directed graphs with labels on the morphisms:

In[3]:= |

Out[3]= |

Show the full directed graphs without labels on the morphisms:

In[4]:= |

Out[4]= |

Show the association of object mappings:

In[5]:= |

Out[5]= |

Show the association of morphism mappings:

In[6]:= |

Out[6]= |

Construct the same abstract category, but now with an equivalence imposed between objects X and Y and morphisms *g*⊙*f* and *g*:

In[7]:= |

Out[7]= |

Construct an abstract functor from this new abstract category, with a new object U, with a new arrow *k* between objects C and U, with new composition and identity symbols ⊗ and ─, and with an equivalence imposed between morphisms *i* and :

In[8]:= |

Out[8]= |

Show the reduced directed graphs, with all equivalences between objects and morphisms imposed and with labels on the morphisms:

In[9]:= |

Out[9]= |

Show the reduced directed graphs without labels on the morphisms:

In[10]:= |

Out[10]= |

Show the association of object mappings, with all equivalences between objects imposed:

In[11]:= |

Out[11]= |

Show the association of morphism mappings, with all equivalences between objects and morphisms imposed:

In[12]:= |

Out[12]= |

Show the list of equivalences between objects:

In[13]:= |

Out[13]= |

Show the list of equivalences between morphisms:

In[14]:= |

Out[14]= |

Show the domain and codomain categories:

In[15]:= |

Out[15]= |

In[16]:= |

Out[16]= |

Show the association form of the abstract functor:

In[17]:= |

Out[17]= |

Construct an abstract functor from a simple abstract category to itself that swaps two of the arrows (*g1* and *g2*) around:

In[18]:= |

Out[18]= |

In[19]:= |

Out[19]= |

In[20]:= |

Out[20]= |

Show that the functor is an endofunctor (a functor from a category to itself):

In[21]:= |

Out[21]= |

Show that the functor is not an identity functor (it does not map every object to itself and every morphism to itself):

In[22]:= |

Out[22]= |

In[23]:= |

Out[23]= |

Return a contravariant version of the same abstract functor (in which the sources and targets of morphisms are swapped):

In[24]:= |

Out[24]= |

In[25]:= |

Out[25]= |

In[26]:= |

Out[26]= |

Show that the direction of morphism composition is reversed:

In[27]:= |

Out[27]= |

In[28]:= |

Out[28]= |

Construct a contravariant identity functor on a more complicated abstract category:

In[29]:= |

Out[29]= |

In[30]:= |

Out[30]= |

In[31]:= |

Out[31]= |

Show that the functor is both an endofunctor and an identity functor:

In[32]:= |

Out[32]= |

In[33]:= |

Out[33]= |

Show that the functor is full, faithful and fully faithful (i.e. it is surjective, injective and therefore bijective as a function on sets of morphisms between pairs of objects):

In[34]:= |

Out[34]= |

In[35]:= |

Out[35]= |

In[36]:= |

Out[36]= |

Construct a new contravariant functor that creates a new arrow (*g3*) between objects Z and Y:

In[37]:= |

Out[37]= |

In[38]:= |

Out[38]= |

Show the association of new morphisms:

In[39]:= |

Out[39]= |

Show that the functor is no longer full nor fully faithful, though it is still faithful (since it is now an injective, though not surjective, function on sets of morphisms between pairs of objects):

In[40]:= |

Out[40]= |

In[41]:= |

Out[41]= |

In[42]:= |

Out[42]= |

Construct a new contravariant functor that imposes an equivalence between morphisms *g1* and *g2* in the codomain category:

In[43]:= |

Out[43]= |

In[44]:= |

Out[44]= |

Show that the functor is no longer faithful nor fully faithful, though it is still full (since it is now a surjective, though not injective, function on sets of morphisms between pairs of objects):

In[45]:= |

Out[45]= |

In[46]:= |

Out[46]= |

In[47]:= |

Out[47]= |

Construct a simple abstract functor from an abstract category representing a span of (mono)morphisms:

In[48]:= |

Out[48]= |

In[49]:= |

Out[49]= |

In[50]:= |

Out[50]= |

Show that this functor is injective, surjective and bijective as a function on the sets of objects:

In[51]:= |

Out[51]= |

In[52]:= |

Out[52]= |

In[53]:= |

Out[53]= |

Construct a new abstract functor that introduces new objects X and Y:

In[54]:= |

Out[54]= |

In[55]:= |

Out[55]= |

Show that the functor is no longer surjective nor bijective as a function on the sets of objects, though it is still injective:

In[56]:= |

Out[56]= |

In[57]:= |

Out[57]= |

In[58]:= |

Out[58]= |

Show that by introducing isomorphisms between objects X and W and objects Y and V in the codomain category, the functor can nevertheless be made essentially surjective on objects:

In[59]:= |

Out[59]= |

In[60]:= |

Out[60]= |

In[61]:= |

Out[61]= |

Even though it is still not strictly surjective on objects:

In[62]:= |

Out[62]= |

Likewise, we can construct a new functor that imposes an equivalence between objects U and V in the codomain category:

In[63]:= |

Out[63]= |

In[64]:= |

Out[64]= |

Show that the functor is no longer injective nor bijective as a function on the sets of objects, though it is still surjective:

In[65]:= |

Out[65]= |

In[66]:= |

Out[66]= |

In[67]:= |

Out[67]= |

Show that by introducing an isomorphism between objects X and Y in the domain category, the functor can nevertheless be made essentially injective on objects:

In[68]:= |

Out[68]= |

In[69]:= |

Out[69]= |

In[70]:= |

Out[70]= |

In[71]:= |

Out[71]= |

Even though it is still not strictly injective on objects:

In[72]:= |

Out[72]= |

Show the list of equivalences between morphisms:

In[73]:= |

Out[73]= |

Construct an abstract functor that adds two new objects (W and U) and three new arrows (*h*, *i* and *g2*) to a simple abstract category:

In[74]:= |

Out[74]= |

In[75]:= |

Out[75]= |

In[76]:= |

Out[76]= |

Show that the functor is an inclusion functor (i.e. the domain is a subcategory of the codomain), but not a full inclusion functor (since it is not a full functor):

In[77]:= |

Out[77]= |

In[78]:= |

Out[78]= |

Similarly, show that the functor is an embedding functor (i.e. it is both faithful and injective on objects), but not a full embedding functor (i.e. it is not fully faithful and injective on objects):

In[79]:= |

Out[79]= |

In[80]:= |

Out[80]= |

Show that the functor does not yield an equivalence of categories (i.e. it is not fully faithful and essentially surjective):

In[81]:= |

Out[81]= |

Apply the abstract functor to the original abstract category (thus yielding the codomain category):

In[82]:= |

Out[82]= |

Apply the abstract functor to a larger abstract category (in which case it acts as an abstract functor on the relevant subcategory):

In[83]:= |

Out[83]= |

Construct an abstract functor that projects certain collections of objects in the domain category to single objects in the codomain category, and certain collections of morphisms in the domain category to identity morphisms in the codomain category (i.e. a simple fibration):

In[84]:= |

Out[84]= |

In[85]:= |

Out[85]= |

In[86]:= |

Out[86]= |

Show the association of fibers/fiber categories for each object in codomain category (i.e. show, for each object in the codomain category, which objects/morphisms in the domain category map to that object/its identity morphism in the codomain category):

In[87]:= |

Out[87]= |

Show the association of fibers/fiber categories for each object in the codomain category, with all equivalences between objects and morphisms imposed:

In[88]:= |

Out[88]= |

Show the graph form of the fiber associated to the object U in the codomain category:

In[89]:= |

Out[89]= |

Show that the fibration is not discrete:

In[90]:= |

Out[90]= |

Show that the functor is not constant (i.e. it does not map all objects in the domain category to a single object in the codomain category, and all morphisms in the domain category to the identity morphism on that object in the codomain category):

In[91]:= |

Out[91]= |

Show that the functor is nevertheless conservative (i.e. a morphism in the codomain category being an isomorphism necessarily implies that the corresponding morphism in the domain category is an isomorphism):

In[92]:= |

Out[92]= |

Show the association of morphism mappings, with all equivalences between objects and morphisms imposed:

In[93]:= |

Out[93]= |

Abstract functors can be constructed directly by applying a function symbol (e.g. F) to an abstract category object:

In[94]:= |

Out[94]= |

In[95]:= |

Out[95]= |

In[96]:= |

Out[96]= |

In[97]:= |

Out[97]= |

If AbstractFunctor is given only an abstract category object, then its default behavior is to construct an identity functor on that category:

In[98]:= |

Out[98]= |

In[99]:= |

Out[99]= |

In[100]:= |

Out[100]= |

In[101]:= |

Out[101]= |

Additional arguments can be used to specify object and arrow mappings:

In[102]:= |

Out[102]= |

In[103]:= |

Out[103]= |

In[104]:= |

Out[104]= |

Further arguments can be used to specify new objects and new arrows that are introduced by the functor:

In[105]:= |

Out[105]= |

In[106]:= |

Out[106]= |

In[107]:= |

Out[107]= |

In[108]:= |

Out[108]= |

Further arguments can be used to specify new composition and identity symbols for the codomain category:

In[109]:= |

Out[109]= |

In[110]:= |

Out[110]= |

In[111]:= |

Out[111]= |

In[112]:= |

Out[112]= |

Further arguments can finally be used to specify new equivalences between objects and morphisms in the codomain category:

In[113]:= |

Out[113]= |

In[114]:= |

Out[114]= |

In[115]:= |

Out[115]= |

If the new composition and identity symbols are omitted, they are assumed to be the same as for the domain category:

In[116]:= |

Out[116]= |

In[117]:= |

Out[117]= |

New composition and identity symbols can be specified for any existing abstract functor:

In[118]:= |

Out[118]= |

In[119]:= |

Out[119]= |

Likewise for new object and morphism equivalences:

In[120]:= |

Out[120]= |

In[121]:= |

Out[121]= |

All four properties (new composition symbol, new identity symbol, new object equivalences and new morphism equivalences) may be specified simultaneously:

In[122]:= |

Out[122]= |

In[123]:= |

Out[123]= |

The optional first argument to AbstractFunctor specifies whether the functor is covariant (True) or contravariant (False):

In[124]:= |

Out[124]= |

In[125]:= |

Out[125]= |

In[126]:= |

Out[126]= |

From an explicit association:

In[127]:= |

Out[127]= |

In[128]:= |

Out[128]= |

Construct an abstract functor from an abstract category and an association of object/arrow mappings, lists/associations of new objects/arrows, new composition/identity symbols and lists of new object/morphism equivalences:

In[129]:= |

Out[129]= |

In[130]:= |

Out[130]= |

Show the list of properties:

In[131]:= |

Out[131]= |

Show the number of objects in the domain category vs. the codomain category of the abstract functor:

In[132]:= |

Out[132]= |

Show the number of morphisms in the domain category vs. the codomain category of the abstract functor:

In[133]:= |

Out[133]= |

Show the list of equivalences between objects in the codomain category of the abstract functor:

In[134]:= |

Out[134]= |

Show the number of equivalences between objects in the codomain category of the abstract functor:

In[135]:= |

Out[135]= |

Show the list of equivalences between morphisms in the codomain category of the abstract functor:

In[136]:= |

Out[136]= |

Show the number of equivalences between morphisms in the codomain category of the abstract functor:

In[137]:= |

Out[137]= |

Show the number of reduced objects (modded out by all object equivalences) in the domain category vs. the codomain category of the abstract functor:

In[138]:= |

Out[138]= |

Show the number of reduced morphisms (modded out by all object and morphism equivalences) in the domain category vs. the codomain category of the abstract functor:

In[139]:= |

Out[139]= |

Show the (binary) symbol used to denote morphism composition in the domain category vs. the codomain category of the abstract functor:

In[140]:= |

Out[140]= |

Show the (unary) symbol used to denote identity morphisms on objects in the domain category vs. the codomain category of the abstract functor:

In[141]:= |

Out[141]= |

Show the list of new objects in the codomain category that have no counterpart in the domain category of the abstract functor:

In[142]:= |

Out[142]= |

Show the number of new objects in the codomain category that have no counterpart in the domain category of the abstract functor:

In[143]:= |

Out[143]= |

Show the reduced list of new objects (modded out by all object equivalences) in the codomain category that have no counterpart in the domain category of the abstract functor:

In[144]:= |

Out[144]= |

Show the number of reduced new objects (modded out by all object equivalences) in the codomain category that have no counterpart in the domain category of the abstract functor:

In[145]:= |

Out[145]= |

Show the association of new morphisms in the codomain category that have no counterpart in the domain category of the abstract functor:

In[146]:= |

Out[146]= |

Show the number of new morphisms in the codomain category that have no counterpart in the domain category of the abstract functor:

In[147]:= |

Out[147]= |

Show the reduced association of new morphisms (modded out by all object and morphism equivalences) in the codomain category that have no counterpart in the domain category of the abstract functor:

In[148]:= |

Out[148]= |

Show the number of reduced new morphisms (modded out by all object and morphism equivalences) in the codomain category that have no counterpart in the domain category of the abstract functor:

In[149]:= |

Out[149]= |

Show the association of mappings between objects in the domain category and corresponding objects in the codomain category of the abstract functor:

In[150]:= |

Out[150]= |

Show the number of mappings between objects in the domain category and corresponding objects in the codomain category of the abstract functor:

In[151]:= |

Out[151]= |

Show the reduced association of mappings (modded out by all object equivalences) between objects in the domain category and corresponding objects in the codomain category of the abstract functor:

In[152]:= |

Out[152]= |

Show the number of reduced mappings (modded out by all object equivalences) between objects in the domain category and corresponding objects in the codomain category of the abstract functor:

In[153]:= |

Out[153]= |

Show the association of mappings between arrows in the underlying quiver of the domain category and corresponding arrows in the underlying quiver of the codomain category of the abstract functor:

In[154]:= |

Out[154]= |

Show the number of mappings between arrows in the underlying quiver of the domain category and corresponding arrows in the underlying quiver of the codomain category of the abstract functor:

In[155]:= |

Out[155]= |

Show the association of mappings between morphisms in the domain category and corresponding morphisms in the codomain category of the abstract functor:

In[156]:= |

Out[156]= |

Show the number of mappings between morphisms in the domain category and corresponding morphisms in the codomain category of the abstract functor:

In[157]:= |

Out[157]= |

Show the reduced association of mappings (modded out by all object and morphism equivalences) between morphisms in the domain category and corresponding morphisms in the codomain category of the abstract functor:

In[158]:= |

Out[158]= |

Show the number of reduced mappings (modded out by all object and morphism equivalences) between morphisms in the domain category and corresponding morphisms in the codomain category of the abstract functor:

In[159]:= |

Out[159]= |

Show the domain of the abstract functor (represented as an abstract category):

In[160]:= |

Out[160]= |

Show the codomain of the abstract functor (represented as an abstract category):

In[161]:= |

Out[161]= |

Determine whether the abstract functor is an endofunctor (i.e. a functor from an abstract category to itself):

In[162]:= |

Out[162]= |

Determine whether the abstract functor is an identity functor (i.e. an endofunctor that maps every object and every morphism to itself):

In[163]:= |

Out[163]= |

Determine whether the abstract functor is a constant functor/selection functor (i.e. a functor mapping every object to some fixed object in the codomain category, and every morphism to the identity morphism on that fixed object):

In[164]:= |

Out[164]= |

Determine whether the abstract functor is a full functor (i.e. a surjective function mapping sets of morphisms between pairs of objects in the domain category to corresponding sets of morphisms between corresponding pairs of objects in the codomain category):

In[165]:= |

Out[165]= |

Determine whether the abstract functor is a faithful functor (i.e. an injective function mapping sets of morphism between pairs of objects in the domain category to corresponding sets of morphisms between corresponding pairs of objects in the codomain category):

In[166]:= |

Out[166]= |

Determine whether the abstract functor is a fully faithful functor (i.e. a bijective function mapping sets of morphisms between pairs of objects in the domain category to corresponding sets of morphisms between corresponding pairs of objects in the codomain category):

In[167]:= |

Out[167]= |

Determine whether the abstract functor is injective on objects (i.e. an injective function mapping the set of objects in the domain category to the corresponding set of objects in the codomain category):

In[168]:= |

Out[168]= |

Determine whether the abstract functor is an essentially injective functor (i.e. a function mapping the set of objects in the domain category to the corresponding set of objects in the codomain category that is injective up to isomorphism):

In[169]:= |

Out[169]= |

Determine whether the abstract functor is surjective on objects (i.e. a surjective function mapping the set of objects in the domain category to the corresponding set of objects in the codomain category):

In[170]:= |

Out[170]= |

Determine whether the abstract functor is an essentially surjective functor (i.e. a function mapping the set of objects in the domain category to the corresponding set of objects in the codomain category that is surjective up to isomorphism):

In[171]:= |

Out[171]= |

Determine whether the abstract functor is bijective on objects (i.e. a bijective function mapping the set of objects in the domain category to the corresponding set of objects in the codomain category):

In[172]:= |

Out[172]= |

Determine whether the abstract functor is an essentially bijective functor (i.e. a function mapping the set of objects in the domain category to the corresponding set of objects in the codomain category that is bijective up to isomorphism):

In[173]:= |

Out[173]= |

Determine whether the abstract functor is conservative (i.e. if a morphism in the codomain category is an isomorphism, then the corresponding morphism in the domain category is necessarily an isomorphism):

In[174]:= |

Out[174]= |

Determine whether the abstract functor yields an equivalence of categories (i.e. a functor that is fully faithful and essentially surjective):

In[175]:= |

Out[175]= |

Compute the association of fibers/fiber categories for each object in the codomain category of the abstract functor (i.e. the objects/morphisms in the domain category that project onto a given object/identity morphism in the codomain category):

In[176]:= |

Out[176]= |

Compute the association of fibers/fiber categories for each object in the codomain category of the abstract functor (i.e. the objects/morphisms in the domain category that project onto a given object/identity morphism in the codomain category), modded out by all object and morphism equivalences:

In[177]:= |

Out[177]= |

Determine whether the abstract functor corresponds to a discrete fibration (i.e. a special case of a Grothendieck fibration in which the fibers are discrete categories):

In[178]:= |

Out[178]= |

Determine whether the abstract functor corresponds to an inclusion functor for a subcategory (i.e. a functor for which the objects/morphisms in the domain category form a subset of the objects/morphisms in the codomain category):

In[179]:= |

Out[179]= |

Determine whether the abstract functor corresponds to a full inclusion functor for a subcategory (i.e. an inclusion functor that is also a full functor):

In[180]:= |

Out[180]= |

Determine whether the abstract functor is an embedding functor (i.e. a functor that is faithful and injective on objects):

In[181]:= |

Out[181]= |

Determine whether the abstract functor is a full embedding functor (i.e. a functor that is fully faithful and injective on objects):

In[182]:= |

Out[182]= |

Swap the variance of the abstract functor (i.e. return a contravariant version of the abstract functor if it was originally covariant, and likewise return a covariant version of the abstract functor if it was originally contravariant):

In[183]:= |

Out[183]= |

Determine whether the abstract functor is a covariant functor (i.e. a functor that preserves the source/target objects of morphisms and the direction of morphism composition):

In[184]:= |

Out[184]= |

Determine whether the abstract functor is a contravariant functor (i.e. a functor that swaps the source/target objects of morphisms and reverses the direction of morphism composition):

In[185]:= |

Out[185]= |

Show the abstract functor represented as a map between full directed graphs with labels on the morphisms:

In[186]:= |

Out[186]= |

Show the abstract functor represented as a map between full directed graphs without labels on the morphisms:

In[187]:= |

Out[187]= |

Show the abstract functor represented as a map between reduced directed graphs, with all equivalences between objects and morphisms imposed and with labels on the morphisms:

In[188]:= |

Out[188]= |

Show the abstract functor represented as a map between reduced directed graphs, with all equivalences between objects and morphisms imposed and without labels on the morphisms:

In[189]:= |

Out[189]= |

Show the abstract functor represented as a map between simple directed graphs, with all self-loops and multiedges removed and with labels on the morphisms:

In[190]:= |

Out[190]= |

Show the abstract functor represented as a map between simple directed graphs, with all self-loops and multiedges removed and without labels on the morphisms:

In[191]:= |

Out[191]= |

Show the abstract functor represented as a map between reduced simple directed graphs, with all self-loops and multiedges removed, plus all object and morphism equivalences modded out and with labels on the morphisms:

In[192]:= |

Out[192]= |

Show the abstract functor represented as a map between reduced simple directed graphs, with all self-loops and multiedges removed, plus all object and morphism equivalences modded out and without labels on the morphisms:

In[193]:= |

Out[193]= |

Show the explicit association form of the functor:

In[194]:= |

Out[194]= |

- Category Theory-Wolfram MathWorld
- The Wolfram Physics Project
- Stephen Wolfram's A New Kind of Science | Online
- Multiway System–Wolfram MathWorld

- 1.0.0 – 09 May 2022

This work is licensed under a Creative Commons Attribution 4.0 International License