Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save abiriadev/da3a8705551fbb276ad74599e9713f12 to your computer and use it in GitHub Desktop.

Select an option

Save abiriadev/da3a8705551fbb276ad74599e9713f12 to your computer and use it in GitHub Desktop.
#import "@preview/elsearticle:3.0.0": *
#import "@preview/theorion:0.6.0": *
#import cosmos.simple: *
#show: show-theorion
#show: elsearticle.with(
title: "An incorrect definition of categories",
)
= Category
#definition[Category][
A category $C$ is defined as a quintuple $("Ob"_C, "Mor"_C, "dom"_C, "cod"_C, compose_C)$ such that the followings hold.
$"Ob"_C$, $"Mor"_C$ are disjoint classes and $"dom"_C, "cod"_C : "Mor"_C -> "Ob"_C$ are class functions whereas $compose_C : "Mor"_C times "Mor"_C -> "Mor"_C$ is a partial class function such that
If $f$, $g$ are elements of $"Mor"_C$, $g compose_C f$ is defined if and only if $"cod"_C (f) = "dom"_C (g)$ holds. In such a case, $"dom"_C (g compose_C f) = "dom"_C (f)$ and $"cod"_C (g compose_C f) = "cod"_C (g)$ should hold.
Additionally, if $A$ is an element of $"Ob"_C$, there exists an element $I$ of $"Mor"_C$ such that for each element $f$ of $"Mor"_C$ where $"dom"_C (f) = A$, $f compose_C I = f$ and for each element $g$ of $"Mor"_C$ where $"cod"_C (g) = A$, $I compose_C g = g$.
Furthermore, if $f$, $g$, $h$ are elements of $"Mor"_C$ such that $"cod"_C (f) = "dom"_C (g)$ and $"cod"_C (g) = "dom"_C (h)$, then $(h compose_C g) compose_C f = h compose_C (g compose_C f)$ holds.
]
#note[
If $C$ is a category, we simply refer to each components of $C$ as just $"Ob"$, $"Mor"$, $"dom"$, $"cod"$, and $compose$, if there is no confusion.
The elements of $"Ob"$ are called _objects_, and the elements of $"Mor"$ are called _morphisms_. If $f$ is a morphism, then $"dom" (f)$ is called the _domain_ of $f$, and $"cod" (f)$ is called the _codomain_ of $f$.
If $A$, $B$ are objects and $f$ is a morphism where $"dom"(f) = A$ and $"cod"(f) = B$, we simply denote it as $f : A -> B$ and say that $f$ is a morphism from $A$ to $B$.
For two objects $A$ and $B$, $"Hom"(A, B)$ denotes the subclass of $"Mor"$ such that every element $f$ has $"dom"(f) = A$ and $"cod"(f) = B$. In other words, $"Hom"(A, B)$ is the class of all morphisms from $A$ to $B$. From here, saying that $f : A -> B$ is equivalent to saying that $f in "Hom"(A, B)$.
If $g compose f$ exists for two morphisms $f$ and $g$, we say that $g compose f$ is a _composition_ of $f$ and $g$.
From the definition above, there exists a morphism $I$ for each object $A$ such that $f compose I = f$ and $I compose g = g$ for all morphisms $f$ from $A$ and $g$ to $A$. As it is easy to show that such a morphism is unique, we refer to such a morphism as 'the' _identity morphism_ of $A$ and denote it as $id_A$.
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment