In previous work ("From signatures to monads in UniMath"), we described a category-theoretic construction of abstract syntax from a signature, mechanized in the UniMath library based on the Coq proof assistant. In the present work, we describe what was necessary to generalize that work to account for simply-typed languages. First, some definitions had to be generalized to account for the natural appearance of non-endofunctors in the simply-typed case. As it turns out, in many cases our mechanized results carried over to the generalized definitions without any code change. Second, an existing mechanized library on $\omega$-cocontinuous functors had to be extended by constructions and theorems necessary for constructing multi-sorted syntax. Third, the theoretical framework for the semantical signatures had to be generalized from a monoidal to a bicategorical setting, again to account for non-endofunctors arising in the typed case. This uses actions of endofunctors on functors with given source, and the corresponding notion of strong functors between actions, all formalized in UniMath using a recently developed library of bicategory theory. We explain what needed to be done to plug all of these ingredients together, modularly. The main result of our work is a general construction that, when fed with a signature for a simply-typed language, returns an implementation of that language together with suitable boilerplate code, in particular, a certified monadic substitution operation.
翻译:在先前的工作(“从签名到UniMath的月球”)中,我们描述了一个基于 Coq 校对助理在 UniMath 库中机械化的签名抽象语法的分类理论构造。在目前的工作中,我们描述的是需要什么来概括这种工作来解释简单类型的语言。首先,一些定义必须普遍化,以说明在简单类型情况下非终端者的自然外观。正如事实所证明的那样,在许多情况下,我们机械化的结果在不改变任何代码的情况下被传递到通用定义中。第二,一个以 $\ omega$- colcontiny factors 的已有的机械化图书馆必须扩展为建筑和理论库的扩展。第三,语义签名的理论框架必须从一个单级到一个双级设置,再次说明在类型情况下出现的非终端替换结果。这使用了与给定源( $omega$- councol continy compator) 的终端动作, 以及一个新式的固定的模型, 需要这些模型的固定的模型, 以及所有固定的模型的模型, 。