definition example

For a Category and object , the slice category (over-category; Kittenlab: typed objects) has objects pairs and morphisms the arrows with :

ee0cfpp0ee0cfpp0

It “describes how is seen from the perspective of its category: the totality of arrows pointing at ”, turning individual arrows into objects. Dually the coslice (under-category) has objects .

Sources: DaoFP §8.1 (“Slice categories”, “Coslice categories”), §10.6 (Comma Category generalizes slices); Kittenlab Lecture 13 (“Typed objects”: ); CTfS §2.7.6.6 (Definition 2.7.6.7, Exercises 2.7.6.8–2.7.6.9), Remark 4.5.3.23, Definition 4.5.3.18

  • Typed sets (Kittenlab): for a set of types, a -typed set is and morphisms preserve types — exactly . Typed graphs and typed Petri nets (e.g. RegNets) live in slices of and . Products in are pullbacks over (the “typed product”).
  • Relative sets (CTfS Definition 2.7.6.7): a set over is a set with a naming function to , and maps must respect the names — e.g. two documents as sets of word occurrences over the set of English words. This is (CTfS Remark 4.5.3.23); , and there is exactly one set over (CTfS Exercise 2.7.6.9). Sets over are equivalent to -indexed families of sets (Indexed Set). CTfS also uses “slice” for the category of cones over a whole diagram , of which the limit is the terminal object (Limit).
  • If has a Terminal Object , the coslice has as objects all global elements of all objects; a morphism maps elements of to elements of — this “justifies our intuition of types as sets of values” (DaoFP).
  • is the Comma Category ; the Category of Elements of a presheaf is a slice of the presheaf category; fibrations and dependent types are families in (DaoFP Ch. 11: “type families as fibrations”, base change by pullback, with adjoints ).

Docs: FinSets — Kittenlab Lecture 13

# Kittenlab Lecture 13: a T-typed finite set is a FinFunction into T; morphisms commute over T
using Catlab
T = FinSet(2)                                   # two types
A = FinFunction([1, 2, 2], T); A′ = FinFunction([2, 1], T)
f = FinFunction([2, 1, 1], 2)                   # A → A′ as sets
compose(f, A′) == A                             # true: f preserves types, so it is a morphism of FinSet/T
# Catlab: the slice category and typed ACSets (e.g. typed Petri nets via `SliceCat` / `Slice`)
#check CategoryTheory.Over        -- Over X : the slice C/X (a comma category)
#check CategoryTheory.Under       -- Under X : the coslice X/C
#check CategoryTheory.Over.mk
-- an object of Hask/T is a type with a "typing" map into T
data Over t a = Over (a -> t)
-- a morphism (Over p) -> (Over p') is f :: a -> a' with p' . f = p (unenforced)