Normal Forms and Complete Relations for Circuits in Agda
Abstract
A set of equations between circuits is complete if it derives every true equation. Normal-form proofs of completeness must show how to reduce a normal form after adjoining one more gate. Recent proofs have appendices hundreds of pages long, produced and checked by hand. We present an Agda library that mechanizes monoid and group presentations by generators and relations, normal forms, and completeness of finite relation sets for wire-indexed circuits. The library represents presented monoids as inductively generated congruences on free monoids of words and normal forms as standard-library function bundles (injections, right inverses, bijections) out of the word setoid. A single generic lemma derives completeness from soundness and a unique normal form witness. A constructive, monoid-level Reidemeister--Schreier method builds normal forms: a tower of verified coset tables adds one digit per level, as in a mixed-radix number system. We give presentation theorems for direct, semidirect, and amalgamated free products and group extensions, with corresponding semantic constructions intended for the Agda standard library. Verified examples include symmetric groups as circuits (sound and complete for both endofunction and permutation semantics), cyclic groups, wreath products (signed permutations at ), and Pauli groups modulo phases in all prime dimensions. We also verify alternating normal forms for the single-qubit and single-qutrit Clifford+ monoids and for as amalgamated free products. A single index module collects the main results. The development is safe, axiom-free Agda. We compare formalizations of group presentations, normal forms, and quantum circuits in Agda, Lean, Rocq, and Isabelle.
Create a lesson
Metadata
- Categories
- cs.LO, quant-ph
- Comments
- 26 pages. Accepted at POPL 2027
Related papers
A Complete Equational Theory for Quantum Circuits with Generalized Control
Shared title terminologycs.LOWilliam Schober, Scott Wesley
RelLens: Relational Reasoning for Floating-Point Constraint Solving
Shared title terminologycs.LOJunjie Li, Yufeng Zhang, Kenli Li et al.
Countable Unions of Positional \mathbfΠ^0_3 Objectives and a \mathbfΣ^0_4-Complete Example
Shared title terminologycs.LOYixuan Sun
Linear Logic via Dependency Relations
Shared title terminologycs.LOTorben Braüner, Valeria de Paiva
Composing SAT and Algebraic Certificates in Lean for End-to-End Circuit Verification
Shared title terminologycs.LODaniela Kaufmann, Pedro Saccomani
A Complete Axiomatisation of Distribution-Based Branching Bisimilarity for Non-Deterministic and Probabilistic Choice
Shared title terminologycs.LORob J. van Glabbeek, Jan Friso Groote, Erik P. de Vink