Nominal unification is an extension of first-order unification that takes into account the α-equivalence relation generated by binding operators, following the nominal approach. We propose a sound and complete procedure for nominal unification with commutative operators, or nominal C-unification for short, which has been formalised in Coq. The procedure transforms nominal C-unification problems into simpler (finite families) of fixpoint problems, whose solutions can be generated by algebraic techniques on combinatorics of permutations.
IntroductionUnification, where the goal is to solve equations between first-order terms, is a key notion in logic programming systems, type inference algorithms, protocol analysis tools, theorem provers, etc. Solutions to unification problems are represented by substitutions that map variables (X, Y, . . . ) to terms.When terms include binding operators, a more general notion of unification is needed: unification modulo α-equivalence. In this paper, we follow the nominal approach to the specification of binding operators [20,30,26], where the syntax of terms includes, in addition to variables, also atoms (a, b, . . . ), which can be abstracted, and α-equivalence is axiomatised by means of a freshness relation a#t and name-swappings (a b). For example, the first-order logic formula ∀a.a ≥ 0 can be written as a nominal term ∀([a]geq(a, 0)), using function symbols ∀ and geq and an abstracted atom a. Nominal unification [30] is the problem of solving equations between nominal terms modulo α-equivalence; it is a decidable problem and efficient nominal unification algorithms are available [11,9,24], that compute solutions consisting of freshness contexts (containing freshness constraints of the form a#X) and substitutions.In many applications, operators obey equational axioms. Nominal reasoning and unification have been extended to deal with equational theories presented by rewrite rules (see, e.g., [18,17,5]) or defined by equational axioms (see, e.g., [14,19]). The case of associative and commutative nominal theories was considered in [3], where a parametric {α, AC}-equivalence relation was formalised in ⋆ Work supported by the Brazilian agencies FAPDF (DE 193.001.369/2016), CAPES (Proc. 88881.132034/2016-01, 2nd author) and CNPq (PQ 307009/2013, 1st author). M. Ayala-Rincón, W. de Carvalho, M. Fernández, D. Nantes-SobrinhoCoq. However, only equational deduction was considered (not unification). In this paper, we study nominal C-unification.Contributions: We present a nominal C-unification algorithm, based on a set of simplification rules, which transforms a given nominal C-unification problem ∆, Q , where ∆ is a freshness context and Q a set of freshness constraints and equations, respectively of the form a# ? s and s ≈ ? t, into a finite set of triples of the form ∇, σ, P , consisting of a freshness context ∇, a substitution σ and a set of fixpoint equations P , of the form π.X ≈ ? X. The simplifications are based on the deduction rules for freshness and α-C-equivalence (denoted as ≈...