Compositional Proof Calculi: Foundations & Applications
- Compositional proof calculi are modular frameworks that transform local derivations into global proofs using categorical tools like double categories and Grothendieck fibrations.
- They establish key theorems of concurrency and associativity by mapping multi-step rewriting to composite rules through explicit diagrammatic constructs.
- These calculi enhance practical verification across rewriting logic, graph rewriting, and resource-sensitive concurrency with automation techniques like frame inference and type-theoretic encoding.
Compositional proof calculi provide structured, modular frameworks for constructing and reasoning about formal proofs in mathematical logic, program semantics, concurrent systems, and rewriting theory. The central property of such calculi is compositionality: the ability to systematically assemble global proofs from local proofs over components or substructures, often with explicit mechanisms for managing interface conditions, decomposition, and recomposition. Recent advances formalize compositional proof calculi across several domains, including categorical rewriting, rewriting logic, dependent type theory, concurrency, and resource-sensitive calculi.
1. Abstract Notions and Categorical Foundations
At the core of modern compositional proof calculi is a categorical perspective, where rewriting, proofs, and morphisms are organized via multi-sum constructions, Grothendieck fibrations, and double categories equipped with precise, fibrational properties. A central structure is the compositional rewriting double category (crDC), which consists of:
- A category of objects (e.g., graphs, states),
- A category of horizontal morphisms (rewriting rules) and squares (direct derivations),
- Functors extracting sources/targets,
- A horizontal composition functor with residual opfibration properties.
Key properties for a double category to admit compositional reasoning (as a crDC) include:
- Existence of multi-sums in ,
- Existence of pullbacks in and ,
- as an isoglobular residual opfibration,
- as a strong multi-opfibration,
- 0 as a residual multi-opfibration.
This structure supports construction of high-level proof macros, which internalize the composition, decomposition, and transformation steps necessary in modular proofs (Behr et al., 2022).
2. Principal Theorems: Concurrency and Associativity
The fundamental results of compositional rewriting theory are the concurrency and associativity theorems:
- Concurrency Theorem: For any two vertically composable squares in a crDC, there exists a canonical bijection (up to isomorphism) between two-step derivations (1) and a single-step derivation (2) along a composite rule, structured via multi-sum and residue data.
- Associativity Theorem: For any three composable rules, the horizontal composition is associative up to canonical isomorphism, with explicit commutative diagrams ("cubes") witnessing the equivalence of different bracketing orders.
The proofs of these theorems exploit the fibrational "macros" provided by the crDC structure, reducing intricate diagram-chasing to a finite sequence of modular constructions. The concurrency theorem is notably concise, while associativity becomes tractable only in the presence of these macros (Behr et al., 2022).
3. Specialization to Concrete Semantics
The compositional abstraction specializes to standard graph rewriting semantics:
- Double Pushout (DPO) Rewriting: Direct derivations are captured as squares in pushout categories; compositionality holds in adhesive HLR categories where pullbacks, pushouts, and final pullback complements exist and are stable under pullbacks.
- Sesqui-Pushout (SqPO) Rewriting: Semantics with FPCs and pushouts along a stable system of monics also fit, provided the base category is 3-adhesive or a quasi-topos.
- The abstract conditions precisely characterize when these rewriting semantics are compositional, via explicit formulas relating stability and existence of categorical constructions (Behr et al., 2022).
This yields a generic framework where complex proof theorems (e.g., concurrency, associativity) immediately follow once the direct derivations of a specific semantic framework instantiate the six axioms of the compositional theory.
4. Compositionality in Rewriting Logic and Automation
In rewriting logic, compositional proof calculi underpin modular verification:
- The parallel composition operator for rewriting-logic theories supports distributed specification, with synchronization over specified property pairs.
- The assume/guarantee rule provides a compositional proof technique: if each component satisfies local obligations and these discharge the global property under the synchronization schema, the composed system is guaranteed to satisfy the global specification.
- Simulation and equational abstraction are shown to be preserved componentwise, supporting compositional refinement and abstraction.
- A distributed vs. global view equivalence theorem allows one to reason equivalently at the local or aggregate (monolithic) level, critical for practical verification (MartÃn et al., 2023).
Automation of compositional verification is advanced by type-theoretic frameworks, such as the Agda formalization with polynomial functors and dependent polynomials. Here, program implementations and proofs compose via wiring diagrams, Kleisli morphisms, and Mealy machines, recovering both modular assembly and coalgebraic operational semantics (Aberlé, 1 Apr 2026).
5. Compositionality in Concurrency, Separation, and Resource Analysis
Several frameworks extend compositional proof calculi to fine-grained and resource-sensitive concurrency:
- In resource-tracking process calculi, compositional bisimulation and contextual preorder proofs allow local reasoning about resource efficiency, enabled by substructural typing and costed operational semantics (Francalanza et al., 2014).
- Recent advances in concurrent separation logic with fractional permissions (CSLPerm) embed compositional reasoning through logical regions and an automated frame inference (FrInfer) procedure. Weak and strong forms of separating conjunction are managed via new distribution and splitting/joining lemmas, and SMT-based automation supports modular verification for parallel threads and function calls (Le, 25 Aug 2025).
- In psi-calculi, compositionality is restored by enriching labelled operational semantics with transition provenances, which track the scope and channel origin of transitions, eliminating the need for symmetry/transitivity constraints on connectivity and yielding full congruence properties of bisimulation (Pohjola, 2019).
6. Proof System Design: Induction, Coinduction, and Compositionality
The degree of compositionality available in a proof calculus depends on its architecture:
- Purely coinductive systems (e.g., reachability logic with a single coinduction rule) support compositionality with respect to transition systems but lack lemma-reuse mechanisms at the formula level.
- Systems mixing induction and coinduction (allowing hypothesis rules, lemma introduction, and step-wise construction) enable asymmetrical or symmetrical compositionality, permitting modular reasoning and mutual lemma dependencies.
- The more a system shifts coinduction into local annotation (e.g., via tagged hypotheses), the more compositional the system becomes, but this complicates the soundness arguments—requiring detailed well-founded induction mechanisms (Rusu et al., 2019).
7. Practical Implications, Benefits, and Limits
The primary benefits of compositional proof calculi are:
- Readability and modularity: Complex global proofs reduce to manageable sequences of local reasoning steps.
- Generality and universality: A unified abstract framework captures a wide spectrum of rewriting and verification semantics, with immediate theorems available for any semantic instance meeting the structural axioms.
- Automation potential: SMT-based frame inference, type-theoretic encoding of program modules, and compressive proof enumeration via combinator terms all support mechanization and runtime efficiency in proof search (Behr et al., 2022, Le, 25 Aug 2025, Aberlé, 1 Apr 2026, Wernhard, 2022).
- Precision in failure: When compositionality fails (e.g., absence of van Kampen property in simple graphs), the precise categorical axiom failing directly identifies the responsible obstruction (Behr et al., 2022).
Limitations persist, particularly in the technical complexity of verifying that semantic frameworks yield the required categorical structure, and in the engineering overhead for proof assistant integration.
Key references for the above developments include "Fundamentals of Compositional Rewriting Theory" (Behr et al., 2022), "Compositional Verification in Rewriting Logic" (MartÃn et al., 2023), "Compositional Program Verification with Polynomial Functors in Dependent Type Theory" (Aberlé, 1 Apr 2026), "Compositional Reasoning for Explicit Resource Management in Channel-Based Concurrency" (Francalanza et al., 2014), "Compositional Verification in Concurrent Separation Logic with Permissions Regions" (Le, 25 Aug 2025), "Psi-Calculi Revisited: Connectivity and Compositionality" (Pohjola, 2019), "(Co)inductive Proof Systems for Compositional Proofs in Reachability Logic" (Rusu et al., 2019), and "Generating Compressed Combinatory Proof Structures" (Wernhard, 2022).