module Cat.Instances.Simplex where

The simplex category🔗

The simplex category, is generally introduced as the category of non-empty finite ordinals and order-preserving maps. We will, for convenience reasons, define it skeletally: Rather than taking actual finite ordinals as objects, we will use the natural numbers as ordinals, each natural standing for the isomorphism class of ordinals of that cardinality.

record Δ-map (n m : Nat) : Type where
  field
    map       : Fin (suc n) → Fin (suc m)
    ascending : (x y : Fin (suc n)) → x ≤ y → map x ≤ map y
Δ : Precategory lzero lzero
Δ .Ob = Nat
Δ .Hom n m = Δ-map n m
Δ .Hom-set _ _ = hlevel 2

Δ .id .map x = x
Δ .id .ascending x y p = p

Δ ._∘_ f g .map x = f .map (g .map x)
Δ ._∘_ f g .ascending x y p = f .ascending _ _ (g .ascending _ _ p)

Δ .idr f = Δ-map-path λ x → refl
Δ .idl f = Δ-map-path λ x → refl
Δ .assoc f g h = Δ-map-path λ x → refl