Symmetries in Reversible Programming: From Symmetric Rig Groupoids to Reversible Programming Languages
Abstract
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 à la Homotopy Type Theory, and show how to derive an equational theory for it, presented by 2combinators 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 1combinators to 1paths, and 2combinators to 2paths in the universe, which is shown to be sound and complete for both levels, establishing full abstraction and adequacy. We extend the already established CurryHoward correspondence for $\mathit{\Pi}$ to a CurryHowardLambek 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 normalisationbyevaluation, verification, and synthesis of reversible logic gates, motivated by examples from quantum computing.
 Publication:

arXiv eprints
 Pub Date:
 October 2021
 arXiv:
 arXiv:2110.05404
 Bibcode:
 2021arXiv211005404C
 Keywords:

 Computer Science  Programming Languages;
 Computer Science  Logic in Computer Science;
 F.1.1;
 F.3.2;
 D.3.2
 EPrint:
 Conditionally accepted to POPL'22