: unification2[1][2]



2[3]2[4][5]

[6][7][8]使1

一階の項の統語論的ユニフィケーション

編集

一階の項

編集

 X = {x,y,z,...} C = {a,b,c,...} F = {f,g,h,...} 

:       

:      k

xyabf(a,x)  g(b,y,x) f(a,f(a,x)) 2a() af(f(a),f(x,y,z)) 

置換

編集

   12u                

一階の項における統語論的ユニフィケーション問題

編集

                

 

 


出現検査

編集

 x x x=f(...,x,...) x  x[9]

非形式的概要

編集

2 s t s t s t[10]

21[11]





[12]使22AC-

使[13]SAT (SMT) 使

一階述語論理でのユニフィケーションの定義

編集

pq

UNIFY(p,q) = U  subst(U,p) = subst(U,q)

subst(U,p) UpUpqpqU[14]

 L = {p,q} LL U' LUsL U' UL[11]
subst(U',L) = subst(s,subst(U,L)).

論理プログラミングでのユニフィケーション

編集

() Prolog Prolog  = Prolog 



Prolog 

(一) (1)

(二)()

(三)()

(1)  Prolog 

型推論

編集

使 Haskell 使使Haskell 1:['a','b','c']  :  a->[a]->[a]  1 aInt['a','b','c'] [Char]a  Char  Int 

:

(一)

(二)2

(三)2使


高階ユニフィケーション

編集

αβη[15][16][17]Gérard Huet Martelli-Montanari [18][19]Huet[20]  Gilles Dowek[21] 

[22][23][24]λPrologTwelf

 (HOU) 使 like(j; m)R(p) R like(j; m) = R(j) [25]

一階の項の統語論的ユニフィケーションの例

編集

Prolog 使使 x,y,zf,g,h a,b,c  &    
Prolog の記法 数学の記法 ユニフィケーションに必要な置換 備考
a = a     成功(恒真式
a = b   失敗 ab は一致しない。
X = X     成功(恒真式
a = X     x は定数 a に単一化される。
X = Y     xy は別名である。
f(a,X) = f(a,b)     関数記号と定数記号が一致しているので、x を 定数 b に単一化する。
f(a) = g(a)   失敗 fg は一致しない。
f(X) = f(Y)     xy は別名である。
f(X) = g(Y)   失敗 fg は一致しない。
f(X) = f(Y,Z)   失敗 アリティが異なる。
f(g(X)) = f(Y)     y を項 g(x) に単一化する。
f(g(X),X) = f(Y,a)     x を定数 a に、y を項 g(a) に単一化する。
X = f(X)   失敗とすべき 出現検査英語版により)厳密な一階述語論理では失敗となり、最近のPrologでも失敗する。古い実装のPrologでは xx=f(f(f(f(...)))) という無限の式に単一化されるが、これは厳密には項ではない。
X = Y, Y = a     xy が共に定数 a に単一化される。
a = Y, X = Y     同上(ユニフィケーションは対称的推移的である)
X = a, b = X   失敗 ab は一致しないので、x はどちらとも単一化できない。

アルゴリズム

編集

              1                           

 

 

 

 

 

 

停止することの証明

編集

 <NUVN,NLHS,EQN> 3NVUN [26]NLHS [27]EQN [28]NUVNNUVNNLHSNUVNNLHSEQN

構造上再帰的なユニフィケーション

編集

コナー・マクブリッジ英語版は、Epigram英語版のような依存型英語版言語で「ユニフィケーションが利用している構造を表現することにより」、ジョン・アラン・ロビンソンのアルゴリズムを再帰的にすることができ、証明の複数の停止条件は不要になることを示した[29]

脚注

編集


(一)^ : identical

(二)^ : equal

(三)^ : syntactic unification

(四)^ : equality

(五)^ : semantic unification

(六)^ J. Herbrand: Recherches sur la théorie de la démonstration. Travaux de la société des Sciences et des Lettres de Varsovie, Class III, Sciences Mathématiques et Physiques, 33, 1930.

(七)^ Claus-Peter Wirth; Jörg Siekmann; Christoph Benzmüller; Serge Autexier (2009). Lectures on Jacques Herbrand as a Logician (SEKI Report). DFKI. arXiv:0902.4682 Here: p.56

(八)^ Jacques Herbrand (1930). Recherches sur la théorie de la demonstration (PDF) (Ph.D. thesis). A. Vol. 1252. Université de Paris. Here: p.96-97

(九)^ : occurs check

(十)^ : unifier

(11)^ ab: most general unifier

(12)^ : equational-unificatione-unification 

(13)^ lamdaProlog

(14)^ Russell, Norvig: Artificial Intelligence, A Modern Approach, p. 277

(15)^ Warren Goldfarb: The undecidability of the second-order unification problem

(16)^ Gérard Huet: The undecidability of unification in third order logic

(17)^ Claudio Lucchesi: The Undecidability of the Unification Problem for Third Order Languages (Research Report CSRR 2059; Department of Computer Science, University of Waterloo, 1972)

(18)^ Martelli, Montanari: An Efficient Unification Algorithm

(19)^ Gérard Huet: A Unification Algorithm for typed Lambda-Calculus []

(20)^ Gérard Huet: Higher Order Unification 30 Years Later

(21)^ Gilles Dowek: Higher-Order Unification and Matching. Handbook of Automated Reasoning 2001: 1009-1062

(22)^ : Dale Miller

(23)^ : higher-order pattern unification

(24)^ Dale Miller: A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification, Journal of Logic and Computation, 1991, pp. 497--536

(25)^ Claire Gardent, Michael Kohlhase, Karsten Konrad, (1997), A multi-level, Higher-Order Unification approach to ellipsis, http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.55.9018 

(26)^ : number of non-unique variables

(27)^ : number of function symbols and constants on the LHS of potential equations

(28)^ : number of equations

(29)^ McBride, Conor (October 2003). First-Order Unification by Structural Recursion. Journal of Functional Programming 13(6): 10611076. doi:10.1017/S0956796803004957. ISSN 0956-7968. http://strictlypositive.org/unify.ps.gz 2012330. 

関連項目

編集

参考文献

編集