I've been looking at syntactic multicategories for mechanizing some type theory stuff.
But multicategories are pretty messy to work with in a two sorted definition like the usual dependently typed encoding.
Stating the operations alone without the laws is a mess. You need extra Forall and concat helpers too to iterate over g the list of argument Homs.
In practice you'd also add another layer of finickyness with setoids.
Class Multicategory := {
Obj: Set ;
Hom: list Obj -> Obj -> Set ;
id A: Hom [A] A ;
compose {B C}:
Hom B C ->
forall (g: Forall (fun o => { a & Hom A o }) B),
Hom (concat g) C
}.
The two sorted definition as a monad in a multispan is more sensible but loses some ease of use.
I'm thinking about trying the single sorted definition or the colored operad approach.
I'd be curious if anyone has any concrete experience with mechanizing this sort of thing.
derive
, in the following file: github.com/FrozenWinters/stlc/blob/main/lists.agda Then continue to the main definition in lines 29-63 of this file: github.com/FrozenWinters/stlc/blob/main/contextual.agda I go on to develop the theory of weakenings and variables that is inherent to every simple contextual category. $\endgroup$