[Paper Review] Computing Critical Pairs in 2-Dimensional Rewriting Systems
This paper presents a novel algorithm for computing critical pairs in 2-dimensional rewriting systems, specifically for 3-polygraphs presenting 2-categories. By adapting unification techniques to compact contexts in monoidal categories, the method generates all critical pairs in finite time, enabling confluence proofs in higher-dimensional rewriting systems, with a working OCaml implementation demonstrating its effectiveness on known examples.
Rewriting systems on words are very useful in the study of monoids. In good cases, they give finite presentations of the monoids, allowing their manipulation by a computer. Even better, when the presentation is confluent and terminating, they provide one with a notion of canonical representative for the elements of the presented monoid. Polygraphs are a higher-dimensional generalization of this notion of presentation, from the setting of monoids to the much more general setting of n-categories. Here, we are interested in proving confluence for polygraphs presenting 2-categories, which can be seen as a generalization of term rewriting systems. For this purpose, we propose an adaptation of the usual algorithm for computing critical pairs. Interestingly, this framework is much richer than term rewriting systems and requires the elaboration of a new theoretical framework for representing critical pairs, based on contexts in compact 2-categories.
Motivation & Objective
- To extend the classical critical pair algorithm from term rewriting to 2-dimensional rewriting systems in the context of 3-polygraphs presenting 2-categories.
- To address the challenge of confluence in higher-dimensional algebraic structures where traditional term-based methods fail due to non-cartesian monoidal structure.
- To develop a unification-based framework that handles multiple inputs and outputs, non-duplicable variables, and planar graphical representations via string diagrams.
- To provide a theoretical and computational foundation for verifying confluence in monoidal categories and related algebraic structures.
- To enable practical verification of confluence in complex rewriting systems, such as those modeling symmetric groups or circuit-like operators.
Proposed method
- Adapts the classical critical pair computation algorithm to 2-categories by modeling rewriting rules as compact 2-dimensional contexts with 0-, 1-, and 2-cells.
- Introduces a non-deterministic unification algorithm that propagates matching constraints across 1-cell boundaries and handles dangling edges via context variables.
- Uses a merge operation to combine compatible 1-cell components, with failure conditions based on label and winding number compatibility.
- Employs a type system to track unification progress, distinguishing between active pairs (T), unification results (U), and new generators (ω) introduced during propagation.
- Represents morphisms using string diagrams and compact nets to visualize rewriting steps and context structures.
- Implements the algorithm in OCaml with less than 2000 lines, successfully recovering critical pairs from known examples like the bijection category.
Experimental results
Research questions
- RQ1How can critical pairs be systematically computed in 2-dimensional rewriting systems where variables cannot be freely duplicated or erased?
- RQ2What is the appropriate generalization of term rewriting's unification-based critical pair algorithm to the setting of 3-polygraphs presenting 2-categories?
- RQ3How can compact contexts in monoidal categories be used to represent and compute critical pairs in a way that preserves confluence information?
- RQ4What are the theoretical and computational conditions under which the algorithm terminates and generates all critical pairs?
- RQ5To what extent does confluence on compact contexts imply confluence in the full 2-category, and when might this fail?
Key findings
- The algorithm terminates and generates all critical pairs in compact contexts, which are finite in number despite the potential infinitude of critical pairs in the full 2-category.
- The method successfully recovers critical pairs for known rewriting systems such as the presentation of the category Bij of finite bijections.
- The implementation in OCaml runs in under one second on typical examples, indicating good practical performance despite the theoretical complexity.
- The algorithm correctly handles non-cartesian monoidal structures by distinguishing between duplicable and non-duplicable variables through context-aware unification.
- Critical pairs are computed via non-deterministic propagation and merging of 1-cell components, with failure conditions based on label and winding number mismatches.
- The framework reveals that confluence on compact contexts does not imply confluence in the full 2-category, mirroring known phenomena in lambda calculus with explicit substitution.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.