First-order unification in the PVS proof assistant.

*(English)*Zbl 1407.68430Summary: This work presents formalizations of properties and algorithms for the first-order unification theory in the proof assistant PVS. In previous works a formalization of the theorem of existence of most general unifiers (\(\mathbf{mgu}\)’s) for first-order unifiable problems was presented and then, it was illustrated how the formalizations of correctness and completeness used for the proof of the theorem of existence, can be adapted in order to verify greedy unification algorithms à la Robinson. The distinguishing feature of these two formalizations is that they remain close to the textbook proofs which was possible through the use of the higher-order specification language and proof engine of PVS. That work consists of two elaborated PVS theories having been the one related with the theorem of existence of \(\mathbf{mgu}\)’s applied for obtaining a full formalization of the Knuth-Bendix(-Huet) critical pair theorem. In addition to these two developments, this work describes a formalization of the correction and completeness of a more elaborated first-order unification algorithm. In contrast with the greedy algorithm, the current one is more efficient. It navigates in a post-order traversal the tree structure of the two terms being unified in such a way that after the difference at the first position of conflict (found in inner-most, left-most order) between the terms is eliminated through a linkage substitution (mapping a variable into a term), the search of the following position of conflict is computed through application of auxiliary functions starting from the previous position. Unlike this more efficient traversal, the greedy unification algorithm always restarts the search of conflicts from the root of the terms being unified. The new formalization gave rise to a more elaborated PVS development in which unlike a relatively straightforward application of correctness and completeness formalizations of the theorem of existence of \(\mathbf{mgu}\)’s, it was necessary the formalization of a series of structural auxiliary lemmas to deal with formalization of properties of the tree data structure used to represent terms.

##### MSC:

68T15 | Theorem proving (deduction, resolution, etc.) (MSC2010) |

68Q42 | Grammars and rewriting systems |