Sharing in Natural-Deduction Proof Graphs: Canonical Folds and the Complexity of Assumption Renaming
A natural-deduction derivation can be stored as a directed acyclic graph in which repeated subderivations are shared, but sharing interacts with the discharge of assumptions. We study this interaction for proof graphs whose vertices are judgments with identifier-labelled contexts and whose hyperedges are rule instances with a discharge set for each premise, so that well-formedness is a local condition. For fixed identifiers sharing is unproblematic: a quotient of a proof graph is a proof graph exactly when the underlying equivalence is a justification congruence, and the coarsest such congruence yields the unique smallest graph with the same unfolding, computable in expected linear time. The identifiers of discharged assumptions, however, are bound names, and choosing them to maximise sharing is a global optimisation problem. Under the convention that bound identifiers differ from free ones, an optimal choice is computable in expected linear time for derivations of discharge depth one. For discharge depth two, deciding whether some renaming yields a graph with at most \(\:k\) vertices is NP-complete, and computing an optimal renaming admits no polynomial-time approximation scheme unless \(\:\text{P}=\text{N}\text{P}\). Hardness already holds for purely implicational minimal logic, under single-identifier as well as set-valued discharge. Contexts summarise locally the open-thread condition of dag-like natural deduction, and, relative to a fixed derivation, level-wise merging of formulas can use exponentially fewer vertices than any proof graph with the same unfolding. The main constructions were checked computationally on small instances.
Authors
- Gia Khanh Pham (ORCID: https://orcid.org/0000-0003-0900-5353)
Institutions
- Vietnam Academy of Science and Technology (VN)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-24
- DOI
- https://doi.org/10.21203/rs.3.rs-11759516/v1
- Primary Topic
- Logic, programming, and type systems
- Type
- preprint