The $\mathit{\Pi}$ family of reversible programming languages for boolean circuits is presented as a syntax of combinators witnessing type isomorphisms of algebraic datatypes. In this paper, we give a denotational semantics for this language, using the language of weak groupoids \`a la Homotopy Type Theory, and show how to derive an equational theory for it, presented by 2-combinators witnessing equivalences of reversible circuits. We establish a correspondence between the syntactic groupoid of the language and a formally presented univalent subuniverse of finite types. The correspondence relates 1-combinators to 1-paths, and 2-combinators to 2-paths in the universe, which is shown to be sound and complete for both levels, establishing full abstraction and adequacy. We extend the already established Curry-Howard correspondence for $\mathit{\Pi}$ to a Curry-Howard-Lambek correspondence between Reversible Logic, Reversible Programming Languages, and Symmetric Rig Groupoids, by showing that the syntax of $\mathit{\Pi}$ is presented by the free symmetric rig groupoid, given by finite sets and permutations. Our proof uses techniques from the theory of group presentations and rewriting systems to solve the word problem for symmetric groups. Using the formalisation of our results, we show how to perform normalisation-by-evaluation, verification, and synthesis of reversible logic gates, motivated by examples from quantum computing.
翻译:用于布林电路的可逆编程语言 $\ mathatit {Pi} 的 $ 为布林电路的可逆编程语言组群 。 我们用一个 $\ a la Digotopy Tyory 的 微弱类群语言, 并展示如何为它得出一个等式理论。 我们用普通语言组群和正式展示的定型逻辑型非维alatal 亚化词组建立对等关系。 在本文中, 我们给该语言组组群提供一种分解性语义。 函文将 1 combing 和 1 path- pormation 数据组的 和 2 combends 相连接, 显示两个等级的均匀和完整, 完全的抽象和充分。 我们将已经建立的 Excry-Howard 对应词组的, 由可翻版的逻辑组群集、 可翻版的逻辑化的逻辑值 和可变解算的解算法的解算法 和Symalmaticalalalation 演示组的 的, 将显示我们的解的解解解的解的解解解算法的解的解的解的解的解解解算法 和解算的系统组的解算的解算法的解算法的解的解的解的解的解的解的解的解的解的解的系统的解的系统 。