In mathematics, specifically category theory, a subcategory of a category \mathcal{C} is a category \mathcal{S} whose objects are objects in \mathcal{C} and whose morphisms are morphisms in \mathcal{C} with the same identities and composition of morphisms. Intuitively, a subcategory of \mathcal{C} is a category obtained from \mathcal{C} by "removing" some of its objects and arrows.
In mathematics, specifically category theory, a subcategory of a category \mathcal{C} is a category \mathcal{S} whose objects are objects in \mathcal{C} and whose morphisms are morphisms in \mathcal{C} with the same identities and composition of morphisms. Intuitively, a subcategory of \mathcal{C} is a category obtained from \mathcal{C} by "removing" some of its objects and arrows.
== Formal definition == Let \mathcal{C} be a category. A subcategory \mathcal{S} of \mathcal{C} is given by a subcollection of objects of \mathcal{C}, denoted \operatorname{ob}(\mathcal{S}), a subcollection of morphisms of \mathcal{C}, denoted \operatorname{mor}(\mathcal{S}). such that for every X in \operatorname{ob}(\mathcal{S}), the identity morphism idX is in \operatorname{mor}(\mathcal{S}), for every morphism f:X\to Y in \operatorname{mor}(\mathcal{S}), both the source X and the target Y are in \operatorname{ob}(\mathcal{S}), for every pair of morphisms f and g in \operatorname{mor}(\mathcal{S}) the composite f\circ g is in \operatorname{mor}(\mathcal{S}) whenever it is defined.
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).