Symmetries in reversible programming: from symmetric rig groupoids to reversible programming languages
Vikraman Choudhury, Jacek Karwowski, Amr Sabry
Abstract
The Pi family of reversible programming languages for boolean circuits is presented as a syntax of combinators witnessing type isomorphisms of algebraic data types. In this paper, we give a denotational semantics for this language, using weak groupoids à la Homotopy Type Theory, and show how to derive an equational theory for it, presented by 2-combinators witnessing equivalences of type isomorphisms. 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, forming an equivalence of groupoids. We use this to establish a Curry-Howard-Lambek correspondence between Reversible Logic, Reversible Programming Languages, and Symmetric Rig Groupoids, by showing that the syntax of Pi is presented by the free symmetric rig groupoid, given by finite sets and bijections. Using the formalisation of our results, we perform normalisation-by-evaluation, verification and synthesis of reversible logic gates, motivated by examples from quantum computing. We also show how to reason about and transfer theorems between different representations of reversible circuits.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 48e39c72-8d83-49f2-a63a-0630ec3bf21dCited by top-tier papers4
- Qunity: A Unified Language for Quantum and Classical ComputingFinn Voichick, Liyi Li, Robert Rand, Michael HicksPOPL 2023 · 35 citations
- With a Few Square Roots, Quantum Computing Is as Easy as PiJacques Carette, Chris Heunen, Robin Kaarsgaard, Amr SabryPOPL 2024 · 7 citations
- The Relational Machine CalculusChris Barrett, Daniel Castle, Willem HeijltjesLICS 2024 · 1 citation
- Compositional Quantum Control Flow with Efficient Compilation in QunityMikhail Mints, Finn Voichick, Leonidas Lampropoulos, Robert RandOOPSLA 2025
Builds on5
- Internalizing representation independence with univalenceCarlo Angiuli, Evan Cavallo, Anders Mörtberg, Max ZeunerPOPL 2021 · 18 citations
- Categories of NetsJohn C. Baez, Fabrizio Genovese, Jade Master, Michael ShulmanLICS 2021 · 14 citations
- A computational interpretation of compact closed categories: reversible programming with negative and fractional typesChao-Hong Chen, Amr SabryPOPL 2021 · 9 citations
- Decidable Synthesis of Programs with Uninterpreted FunctionsPaul Krogmeier, Umang Mathur, Adithya Murali, P. Madhusudan et al.CAV 2020 · 8 citations
- Coherence via Well-Foundedness: Taming Set-Quotients in Homotopy Type TheoryNicolai Kraus, Jakob von RaumerLICS 2020 · 8 citations
Related papers
- One Rig to Control Them AllChris Heunen, Robin Kaarsgaard, Louis LemonnierLICS 2026 · 2 citations
- Complete ω-Regular Supermartingale CertificatesAlessandro Abate, Mirco Giacobbe, Sergey Ichtchenko, Diptarko RoyLICS 2026
- Hadamard-Pi: Equational Quantum ProgrammingWang Fang, Chris Heunen, Robin KaarsgaardPOPL 2026
- Constructing Higher Inductive Types as Groupoid QuotientsNiels van der WeideLICS 2020 · 1 citation
- A Constructive Model of Directed Univalence in Bicubical SetsMatthew Z. Weaver, Daniel R. LicataLICS 2020 · 15 citations
