Sindbad~EG File Manager
����; � TeX output 2004.01.05:0940� ������� ���`� ��� �����b�� ��t�src:11LambdaLogic.tex���N� G� cmbx12�Lam��u�b� �=da�z�Logic��#�Ѝ� �4"��-�
cmcsc10�Michael���Beeson������2��K� cmsy8����� ��zYA�+� ':
cmti10�San���Jos�����$�e�State�University,�San�Jos� �!e,�CA,�USA��,� �� �3��src:31LambdaLogic.tex�4��N� cmbx12�Abstract�����4 �5K�`y
�3
cmr10�Lam��!b�M�da��!logic�is�the�union�of�rst�order�logic�and�lam�b�M�da�calculus.�W��ee��
����4 pro��!v�e�8�basic�metatheorems�for�b�M�oth�total�and�partial�v��!ersions�of�lam�b�M�da����4 logic.�7W��ee�use�lam��!b�M�da�logic�to�state�and�pro�v�e�a�soundness�theorem�allo�w-����4 ing�,ethe�use�of�second�order�unication�in�resolution,�demo�M�dulation,�and����4 paramo�M�dulation��fin�a�rst-order�con��!text.������4 �src:35LambdaLogic.texKEYW��!ORDS:���automated�deduction,�computer�pro�M�ofs,�unication,�second����4 order,��fOtter��� �$ ��� �7��N� ff cmbx12�1.��*�1In���tro�s3duction��� �� �src:39LambdaLogic.tex�X�Q cmr12�The��Ut��rw�en�tieth�cen�tury�sa�w�the�
o�w�ering�of�rst�order�logic,�and�the�in�v�en�tion��� �� and��+dev��relopmen�t�of�the�lam�b�S�da�calculus.�When�the�lam�b�S�da�calculus�w�as�rst���� dev��relop�S�ed,�K�its�creator�(Alonzo�Ch�urc�h)�in�tended�it�as�a�foundational�system,���� i.e.,�lvone�in�whic��rh�mathematics�could�b�S�e�dev�elop�S�ed�and�with�the�aid�of�whic�h�the���� foundations���of�mathematics�could�b�S�e�studied.�His�rst�theories�w��rere�inconsisten�t,���� just��1as�the�rst�set�theories�had�b�S�een�at�the�op�ening�of�the�t��rw�en�tieth��1cen�tury��V.���� Mo�S�dications�O~of�these�inconsisten��rt�theories�nev�er�ac�hiev�ed�the�fame�that�mo�S�d-���� ications���of�the�inconsisten��rt�set�theories�did.�Instead,�rst�order�logic�came�to���� b�S�e�ythe�to�ol�of�c��rhoice�for�formalizing�mathematics,�and�lam�b�S�da�calculus�is�no�w���� considered��as�one�of�sev��reral�to�S�ols�for�analyzing�the�notion�of�algorithm.����!���src:47LambdaLogic.texThe�-�p�S�oin��rt�of�view�underlying�lam�b�S�da�logic�is�that�lam�b�S�da�calculus�is�a�go�o�d���� to�S�ol�D+for�represen��rting�the�notion�of�function,�not�only�the�notion�of�computable���� function.�|�First-order�logic�can�treat�functions�b��ry�in�tro�S�ducing�function�sym�b�S�ols���� for�K�particular�functions,�but�then�there�is�no�w��ra�y�K�to�construct�other�functions�b��ry���� abstraction��-or�recursion.�Of�course,�one�can�consider�set�theory�as�a�sp�S�ecial�case���� of��urst�order�logic,�and�dene�functions�in�set�theory�as�univ��X�alen��rt�functions,�but���� this��srequires�building�up�a�lot�of�formal�mac��rhinery��V,�and�has�other�disadv��X�an�tages���� as�WEw��rell.�It�is�natural�to�consider�com�bining�lam�b�S�da�calculus�with�logic.�That�w�as��UT�����#g��^��O!� cmsy7�����( �K�`y
cmr10�Researc���h�UUsupp�Gorted�b�y�NSF�gran�t�n�um�b�Ger�CCR-0204362.��� ��� *��� ���`� ��� ���Lam��!b�M�da��fLogic����� ����� �� �done�.qlong�ago�in�the�case�of�t��ryp�S�ed�logics;�for�example�G�� odel's�theory�T�.Ahad�what��� �� amoun��rted���to�the�abilit�y�to�dene�functions�b�y�lam�b�S�da-abstraction.�But�t�yp�S�ed���� lam��rb�S�da���calculus�lac�ks�the�full�p�S�o�w�er�of�the�un�t�yp�S�ed�(ordinary)�lam�b�S�da�calculus,���� as��there�is�no�xed-p�S�oin��rt�theorem�to�supp�ort�arbitrary�recursiv��re�denitions.����!���src:57LambdaLogic.texIn���this�pap�S�er,�w��re�com�bine�ordinary�rst�order�lam�b�S�da�calculus�with�ordinary���� rst�&order�logic�to�obtain�systems�w��re�collectiv�ely�refer�to�as�lam�b�S�da�logic.�W��Ve�are���� not���the�rst�to�dene�or�study�similar�systems.�����2�y����The�applicativ��re�theories�prop�S�osed���� b��ry��F��Veferman�in�(�6���)�are�similar�in�concept.�They�are,�ho�w�ev�er,�dieren�t�in�some���� tec��rhnical���details�that�are�imp�S�ortan�t�for�the�theorems�pro�v�ed�here.�Lam�b�S�da�logic���� is��?also�related�to�the�systems�of�illativ��re�com�binatory�logic�studied�in�(�2���),�but���� these��are�stronger�than�lam��rb�S�da�logic.����!���src:66LambdaLogic.texBoth��hordinary�and�lam��rb�S�da�logic�can�b�e�mo�died�to�allo��rw�\undened�terms".���� In�the�con��rtext�of�ordinary�logic�this�has�b�S�een�studied�in�(�8���;��4����;��3��).�In�the�con��rtext�of���� applicativ��re�>~theories,�(�3���)�dened�and�studied�\partial�com�binatory�algebras";�but���� application��in�the����g� cmmi12��-calculus�is�alw��ra�ys��total.�Moggi�(�7���)�w��ras�apparen�tly�the�rst�to���� publish���a�denition�of�partial�lam��rb�S�da�calculus;�see�(�7���)�for�a�thorough�discussion���� of��dieren��rt�v�ersions�of�partial�lam�b�S�da�calculus�and�partial�com�binatory�logic.����!���src:71LambdaLogic.texThe�5system�Otter2�(�5���)�uses�second-order�unication�in�an�un��rt�yp�S�ed�5con�text���� to��enhance�the�capabilities�of�the�automated�theorem�pro��rv�er��Otter.�Inference���� rules���suc��rh�as�resolution�and�paramo�S�dulation�are�allo�w�ed�to�use�second-order���� unication��<instead�of�only�rst�order�unication.�Higher�order�unication�has���� in�9�the�past�b�S�een�used�with�t��ryp�ed�systems.�Lam��rb�da�logic�pro��rvides�a�theoretical���� foundation���for�its�application�in�an�un��rt�yp�S�ed���setting,�as�w��re�sho�w�with�a�soundness���� theorem���in�this�pap�S�er.�Lam��rb�da�logic�answ��rers�the�question,�\In�what�formal���� system��can�the�pro�S�ofs�pro�duced�b��ry�Otter2�b�e�naturally�represen��rted?".��#V��� �2.��*�1Syn���tax��1Ǎ� �src:79LambdaLogic.tex�W��Ve�M�will�not�rep�S�eat�the�basics�of�rst�order�logic�or�the�basics�of�lam��rb�da�calculus,���� whic��rh��can�b�S�e�found�in�(�9���)�and�(�1��),�resp�S�ectiv��rely��V.�W�e�start�with�an��ry�of�the�usual���� form��rulations���of�rst�order�logic�with�equalit�y��V.�This�includes�a�sto�S�c�k�of�v��X�ariables,���� constan��rts,��[and�function�sym�b�S�ols,�from�whic�h�one�can�build�up�terms�and�form�ulas���� as�Yusual.�In�addition,�there�is�a�distinguished�unary�function�sym��rb�S�ol��Ap�.�As���� usual��in�lam��rb�S�da�calculus,�w�e�optionally�abbreviate��Ap�(�x;���y�n9�)�to��x�(�y��)�or�ev��ren��xy��,���� with�A�left�asso�S�ciation�understo�o�d�in�expressions�lik��re��xy�n9z� ��,�whic�h�means�(�xy�n9�)�z� ��.�But���� w��re�v�do�this�less�often�than�is�customary�in�lam�b�S�da�calculus,�since�w�e�also�ha�v�e���� �f�G��(�x�)�H-where��f��,�is�a�function�sym��rb�S�ol;�and�this�is�not�the�same�as��Ap�(�f� ��;���x�).�Of���� course,���theoretically�there�is�only�one�syn��rtactically�correct�w�a�y�of�reading�the���� abbreviated��term.����!���src:90LambdaLogic.texLam��rb�S�da-terms��are�created�b�y�the�follo�wing�term�formation�rule:����!���src:92LambdaLogic.texIf�t��is�a�term�and��x��is�a�v��X�ariable,�then��x:���t��is�a�term.����!���src:94LambdaLogic.texThe��cnotion�of�a�v��X�ariable�b�S�eing�free�in�a�term�is�dened�as�usual:�quan��rtiers���㍍���#�X��^��y����( �F��*�or�<�example,�John�McCarth���y�told�me�that�he�lectured�on�suc�h�systems�y�ears�ago,�but�� �� nev���er�UUpublished�an�ything.����� ��� ���`� ��� ����M.��fJ.�Beeson����� ����� �� �and��Nlam��rb�S�da�b�oth�bind�v��X�ariables.�The�notion�of�substitution�is�dened�as�in�(�1���).��� �� The���notation�is��t�[�x�UR�:=��s�]���for�the�result�of�substituting��s��for�the�free�v��X�ariable��x��in���� �t�.�Q�Note�that�this�is�literal�substitution,�i.e.��t�[�x�UR�:=��s�]�Q�do�S�es�not�imply�the�renaming���� of���b�S�ound�v��X�ariables�of��t��to�a��rv�oid���capture�of�free�v�ariables�of��s�.�W��Ve�also�dene���� �t�[�x��>�::=��s�],��whic��rh�do�S�es�imply�an�algorithmic�renaming�of�b�ound�v��X�ariables�of��t��to���� a��rv�oid��capture�of�free�v��X�ariables�of��s�.����!���src:100LambdaLogic.texAlpha-con��rv�ersion� means�renaming�a�b�S�ound�v��X�ariable�in�suc��rh�a�w�a�y�that�there���� is��no�capture�of�formerly�free�v��X�ariables�b��ry�the�renamed�v�ariable.�The�induced���� equiv��X�alence�Y�relation�on�terms�is�called�alpha-equiv�alence.�Beta-reduction�is�de-���� ned��as�usual.���� �src:104LambdaLogic.tex�8���@ cmti12�Example�:��Lin�rst�order�logic�w��re�can�form�ulate�the�theory�of�groups,�using�a���� constan��rt��տe��for�the�iden�tit�y��V,�and�function�sym�b�S�ols�for�the�group�op�eration�and���� in��rv�erse.�˰The�use�of�inx�notation��x�C��!",�
cmsy10���y�9�can�˰either�b�S�e�regarded�as�ocial�or�as���� an�A�informal�abbreviation�for��m�(�x;���y�n9�),�just�as�it�can�in�rst�order�logic.�If�w��re���� form��rulate�!�the�same�theory�in�lam�b�S�da�logic,�w�e�use�a�unary�predicate��G��for�the���� group,���and�relativize�the�group�axioms�to�that�predicate,�just�as�w��re�w�ould�do�in���� rst��order�logic�if�w��re�needed�to�study�a�group�and�a�subgroup.�Then�in�lam�b�S�da���� logic��w��re�can�dene�the�comm�utator:��� �� ����c�UP�:=��x;���y�n9:�((�i�(�x�)������i�(�y��))����x�)����y���� �src:111LambdaLogic.tex�and��then�w��re�can�deriv�e�the�follo�wing�in�lam�b�S�da�logic:��� ��!���src:113LambdaLogic.tex����q X�G�(�x�)����^��G�(�y�n9�)�UR�!��c�(�x;���y��)�=�((�i�(�x�)������i�(�y��))����x�)����y��$ ��� �3.��*�1Axioms��� �� �src:117LambdaLogic.tex�Lam��rb�S�da�Ίlogic�can�b�e�form��rulated�using�an�y�of�the�usual�approac�hes�to�predicate���� calculus.��NW��Ve�distinguish�the�sequen��rt-calculus�form�ulation,�the�Hilb�S�ert-st�yle�for-���� m��rulation,�(�and�the�resolution�form�ulation.�F��Vor�deniteness�w�e�c�ho�S�ose�the�Hilb�ert-���� st��ryle��form�ulation�as�the�denition�(sa�y�as�form�ulated�in�(�9���),�p.�20),�for�the�stan-���� dard��v��rersion.�There�will�then�b�S�e�t�w�o�further�v��X�arian�ts�for�dieren�t�logics�of�partial���� terms,��but�these�will�b�S�e�discussed�in�another�section.����!���src:123LambdaLogic.tex(�Pr��ffop�)��prop�S�ositional�axioms����!���src:125LambdaLogic.tex(�Q�)��standard�quan��rtier�axioms����!���src:127LambdaLogic.tex(����)��t�Z`�=��s��if��t��and��s��are�alpha-equiv��X�alen��rt.�The�alternativ�e�w�ould�b�S�e�to�include���� the��axiom�only�in�case��t��alpha-con��rv�erts��to��s�.����!���src:130LambdaLogic.tex(�� �O�)�Ap�(�x:���t;�s�)�����P���UR�������n:�=��������t�[�x�UR�::=��s�]����!���src:132LambdaLogic.tex(�� �s�)��p(�we��ffak� extensionality�)��8�x�(�Ap�(�t;���x�)�����P���UR�������n:�=��������Ap�(�s;�x�))�UR�!��x:���Ap�(�t;�x�)�����P���UR�������n:�=������x:�Ap�(�s;�x�)����!���src:134LambdaLogic.tex(�non-triviality�)����T�����6�=�UR�F�,��where��T��=��xy�n9:���x��and��F��=��xy�n9:���y����!���src:136LambdaLogic.tex�The�G0follo��rwing�additional�form�ulae�are�not�part�of�lam�b�S�da�logic,�but�are�of���� in��rterest.����!���src:138LambdaLogic.tex(��n9�)��(�extensionality�)��x:���Ap�(�t;�x�)�����P���UR�������n:�=��������t�.����!���src:140LambdaLogic.tex(�A��2C�)��(�Axiom�35of�Choic��ffe�)��8�x�9�y�n9P��ƹ(�x;���y��)�UR�!�9�f�G��8�xP��(�x;���Ap�(�f� ��;�x�)).����� ���� ���`� ��� ���Lam��!b�M�da��fLogic����� ����� ��� �4.��*�1Seman���tics��7�� �src:144LambdaLogic.tex�There���is�a�standard�denition�of���-mo�S�del�that�is�used�in�the�seman��rtics�of�the��� �� lam��rb�S�da�8�calculus�(see�(�1���),�p.�86,�with�details�on�p.�93).�There�is�also�a�w�ell-kno�wn���� notion���of�a�mo�S�del�of�a�rst�order�theory��V.�In�this�section�our�goal�is�to�dene�the���� concept���M�ug�is�4�a�mo��ffdel�of�the�the�ory��T��I�in�lamb�da�lo�gic���in�suc��rh�a�w�a�y�that�it�will���� imply��that,�neglecting���,��M�
�is�a�rst�order�mo�S�del�of��T��ƹ,�and�also,�neglecting�the���� function��sym��rb�S�ols�other�than��Ap�,��M�+��is�a���-mo�del.����!���src:151LambdaLogic.texThe��cited�denition�of���-mo�S�del�in��rv�olv�es��the�notion�of�terms,�whic��rh�w�e�shall���� call�k�M�@�-terms,�built�up�from��Ap��and�constan��rts��c������2 cmmi8�a�� :�for�eac�h�elemen�t��a��of�the�mo�S�del.���� It���requires�the�existence,�for�eac��rh�term��t��of�this�kind,�and�eac�h�v��X�ariable��x�,�of���� another�M�@�-term������2�����(�x;���t�)�suc��rh�that��M�+��will�satisfy������ ���Ap�(����������(�x;���t�)�;�x�)�UR=��t:���� �src:155LambdaLogic.tex�Note��that�this�do�S�es�not�y��ret�mak�e�sense,�as�w�e�m�ust�rst�dene�the�notion�of��� �� \the��in��rterpretation�of�a�term��t��in��M�@�".�W��Ve�cannot�simply�refer�to�(�1���)�for�the���� denition,�t�since�w��re�need�to�extend�this�denition�to�the�situation�in�whic�h�w�e���� ha��rv�e�8�a�theory��T��e�with�more�function�sym��rb�S�ols�than�just��Ap�,�although�the�required���� generalization��is�not�dicult.����!���src:160LambdaLogic.texW��Ve��Irst�dene�a���-structure.�As�usual�in�rst�order�logic�w��re�sometimes�use���� \�M�@�"�m&to�denote�the�carrier�set�of�the�structure��M��;�and�w��re�use��f����M��
��or����W������*����f�����for�the���� function�J�in�the�structure��M��ȹthat�serv��res�as�the�in�terpretation�of�the�function���� sym��rb�S�ol�?X�f�G��,�but�w�e�sometimes�omit�the�bar�if�confusion�is�unlik�ely��V.�(�M� ��;�����)�is���� a��ÿ�-structure�for��T�L��if�(1)��M�맹is�a�structure�with�a�signature�con��rtaining�all�the���� function��4sym��rb�S�ols�and�constan�ts�o�S�ccurring�in��T��ƹ,�and�another�binary�function��Ap����M����� �to���serv��re�as�the�in�terpretation�of��Ap�,�and�(2)�there�is�an�op�S�eration������2��� Z�on�pairs���� (�x;���t�),�`�where��t��is�an��M�@�-term�and��x��is�a�v��X�ariable,�pro�S�ducing�an�elemen��rt������2�����(�x;�t�)���� of�M�@�.����!���src:169LambdaLogic.texIf��((�M� ��;�������2�����)�is�a���-structure�for��T��ƹ,�then�b��ry�a��valuation��w�e�mean�a�map��g�ia�from�the���� set�g
of�v��X�ariables�to�(the�carrier�set�of� �8)��M�@�.�If��g��C�is�a�v�aluation,�and��v�Ë�=�UR�v�����|{Y cmr8�1����;����:�:�:��ʜ;���v����n�� Z�is���� a���list�(v��rector)�of�v��X�ariables,�then�b�y��g�n9�(�v��)���w�e�mean��g�n9�(�v���̽1����)�;����:�:�:��ʜ;���g��(�v����n���P�).���If��t��is�a�term,���� then��b��ry��t�[�v�Ë�:=�UR�g�n9�(�v��)]��w�e�mean�the��M�@�-term�resulting�from�replacing�eac�h�v��X�ariable���� �v����i��s}�b��ry��the�constan�t��c����g�I{�(�v��8:�;� cmmi6�i��,r�)����for�the�elemen�t��g�n9�(�v����i��dڹ)�of��M�@�.�If��g�|ܹis�a�v��X�aluation,�then�w�e���� can��then�extend��g�X�to�the�set�of�terms�b��ry�dening�������� ����g�n9�[�f�G��(�t���̽1����;����:�:�:��ʜ;���t����n���P�)]����� Ԇ�=��������W�� �9*��*��� 窀�f��� �'�(�g�n9�(�t���̽1����)�;����:�:�:��ʜ;���g��(�t����n���P�))����� ���� �疿g�n9�[�x:t�]����� Ԇ�=����� 窀����������(�x;���t�[�v�Ë�:=�UR�g�n9�(�v��)])������!���src:179LambdaLogic.texNo��rw��xw�e�ha�v�e�made�sense�of�the�notion�\the�in�terpretation�of�term��t��under��� �� v��X�aluation��)�g�n9�".�W��Ve�dene�the�notion��M��6�j��� �=��
xܿ��as�it�is�usually�dened�for�rst�order���� logic.��W��Ve�are�no��rw�in�a�p�S�osition�to�dene���-mo�del.�This�denition�coincides�with���� that��in�(�1���)�in�case��T��n�has�no�other�function�sym��rb�S�ols�than��Ap�.��A����� �Denition�35(��-mo��ffdel):��� �� �src:184LambdaLogic.tex�(�M� ��;�������2�����)��is�a���-mo�S�del�of�a�theory��T��ùin�lam��rb�da�logic�if���� (�M� ��;�������2�����)��satises�the�axioms�����,��� �O�,�and��� �s�,�and��M�+��satises�the�axioms�of��T��ƹ.����� ,b��� ���`� ��� ����M.��fJ.�Beeson����� ����� ��� �5.��*�1Basic�ffMetatheorems��� �� �src:190LambdaLogic.tex�Dene��athe�relation��t�f����s��a�on�terms�of��T�-'�to�mean�that��t��and��s��ha��rv�e��aa�common��� �� reduct��(using���Sa�and������reductions).�The�Ch��rurc�h-Rosser��theorem�for����calculus���� ((�1���),��p.�62)�implies�that�this�is�an�equiv��X�alence�relation,�when�the�language�in-���� cludes��only��Ap��and���.�The�follo��rwing�theorem�sa�ys�that�adding�additional�function���� sym��rb�S�ols��do�es�not�destro��ry�the�Ch�urc�h-Rosser�prop�S�ert�y��V.��� ���� �Theorem���5.1:���kU��src:194LambdaLogic.tex�The�35Chur��ffch-R�osser�the�or�em�is�valid�for�lamb�da�lo�gic.���� �src:197LambdaLogic.texPr��ffo�of�.���F��Vor�eac��rh�function�sym�b�S�ol��f����w�e�in�tro�S�duce�a�constan�t����W��B���*����f���Ʀ�.�W��Ve�can�then��� �� eliminate���f��in�fa��rv�or���of����W��e���*����f����y�as�follo��rws.�F��Vor�eac�h�term��t��w�e�dene�the�term��t����2��� ��as���� follo��rws:��� ���� �+�x����������� ����=����� Ү �x���for��v��X�ariables��x������ ���� ���c����������� ����=����� Ү �c���for��v��X�ariables��c��������� �Vf�G��(�t�)����������� ����=����� Ү �Ap�(����W������*���f����;���t���������)�������� �su�f�G��(�t;���r�S��)����������� ����=����� Ү �Ap�(�Ap�(����W������*���f����;���t���������)�;�r��S���������))�������� �ц�Ap�(�t;���r�S��)����������� ����=����� Ү �Ap�(�t���������;���r��S���������)�������� ��=(�x:���t�)����������� ����=����� Ү �x:���t������������ �src:209LambdaLogic.tex�and��;similarly�for�functions�of�more�than�t��rw�o��;argumen�ts.�Since�there�are�no��� �� reduction���rules�in��rv�olving���the�new�constan��rts,��t��reduces�to��q��if�and�only�if��t����2������ �reduces�E\to��q��n9���2���.=�.�Moreo��rv�er,�E\if��t����2���
`�reduces�to��v�n9�,�then��v����has�the�form��u����2����for�some���� �u�.�l�(Both�assertions�are�pro��rv�ed�l�b�y�induction�on�the�length�of�the�reduction.)���� Supp�S�ose��E�t��reduces�to��q��~�and�also�to��r��.�Then��t����2��� DI�reduces�to��q��n9���2��� ���and�to��r�����2�����.�By�the���� Ch��rurc�h-Rosser�]�theorem,��q��n9���2������and��r��S����2���q�ha��rv�e�]�a�common�reduct��v�n9�,�and��v�˻�is��u����2�����for�some���� �u�,��so��q�X�and��r�>6�b�S�oth�reduce�to��u�.�That�completes�the�pro�of.����!���src:216LambdaLogic.texThe��yfollo��rwing�theorem�is�to�lam�b�S�da�logic�as�G�� odel's�completeness�theorem�is���� to�nrst�order�logic.�As�in�rst�order�logic,�a�theory��T�ݹin�lam��rb�S�da�logic�is�called���� �c��ffonsistent�K`�if�it�do�S�es�not�deriv��re�an�y�con�tradiction.�In�this�section,�w�e�will�pro�v�e���� the�klam��rb�S�da�completeness�theorem:�an�y�consisten�t�theory�has�a���-mo�S�del.�First,���� w��re��need�some�preliminaries.��� ���� �Theorem���5.2�(Lambd���a�Completeness�Theorem):���;�e�src:221LambdaLogic.tex�L��ffet��ؿT�_��b�e�a�c�onsistent���� the��ffory�35in�lamb�da�lo�gic.�Then��T���has�a���-mo�del.���� �src:225LambdaLogic.texR��ffemark�.�dThere�is�a�kno��rwn�\rst�order�equiv��X�alen�t"�of�the�notion�of���-mo�S�del,���� namely��i�Sc��ffott�Лdomain�.�See�(�1���)(section�5.4).�Ho��rw�ev�er,��iw�e�could�not�use�Scott���� domains��uto�reduce�the�lam��rb�S�da�completeness�theorem�to�G�� odel's�rst�order�com-���� pleteness�7 theorem,�b�S�ecause�there�is�no�syn��rtactic�in�terpretation�of�the�theory�of���� Scott��domains�in�lam��rb�S�da�logic.���� �src:227LambdaLogic.tex�Pr��ffo�of��of�the�c��ffompleteness�the�or�em�.���The�usual�pro�S�of�(Henkin's�metho�d)�of�the���� completeness��theorem,�as�set�out�for�example�in�(�9���)�pp.�43-48,�can�b�S�e�imitated����� >I��� ���`� ��� ���Lam��!b�M�da��fLogic����� ����� �� �for�2lam��rb�S�da�logic.�If��T����do�es�not�con��rtain�innitely�man�y�constan�t�sym�b�S�ols,�w�e��� �� b�S�egin�~gb��ry�adding�them;�this�do�es�not�destro��ry�the�consistency�of��T� -�since�in�an�y���� pro�S�of�,of�con��rtradiction,�w�e�could�replace�the�new�constan�ts�b�y�v��X�ariables�not�o�S�c-���� curring�t�elswhere�in�the�pro�S�of.�W��Ve�construct�the�\canonical�structure"��M��j�for�a���� theory�̽�T��ƹ.�The�elemen��rts�of��M�
��are�equiv��X�alence�classes�of�closed�terms�of��T�n��under���� the�4>equiv��X�alence�relation�of�pro��rv�able�equalit��ry:��t��P���r��̹i�4>�T�(�`��t��=��r�S��.�Let�[�t�]�b�e���� the��Dequiv��X�alence�class�of��t�.�W��Ve�dene�the�in��rterpretations�of�constan�ts,�function���� sym��rb�S�ols,��and�predicate�sym�b�S�ols�in��M�+��as�follo�ws:��� ���� ��A�c�����M������ �s��=����� ��H[�c�]����� ���� �t��f��G�����M��
��([�t���̽1����]�;����:�:�:��ʜ;����[�t����n���P�])����� �s�=����� ��H[�f�G��(�t���̽1����;����:�:�:��ʜ;���t����n���P�)]�������� �S�P���Ɵ���M��%��([�t���̽1����]�;����:�:�:��ʜ;����[�t����n���P�)]����� �s�=����� ��H[�P��ƹ(�t���̽1����;����:�:�:��ʜ;���t����n���P�)]������ �src:242LambdaLogic.texIn�athis�denition,�the�righ��rt�sides�dep�S�end�only�on�the�equiv��X�alence�classes�[�t����i��dڹ]�(as��� �� sho��rwn��in�(�9���),�p.�44).����!���src:244LambdaLogic.texExactly���as�in�(�9���)�one�then�v��reries�that��M��s�is�a�rst�order�mo�S�del�of��T��ƹ.�T��Vo�turn���� �M��in��rto��a���-mo�S�del,�w�e�m�ust�dene������2�����(�x;����[�t�]),�where��x��is�a�v��X�ariable�and��t��is�an���� �M�@�-term,��4i.e.�a�closed�term�with�parameters�from��M��.�The�\parameters�from��M��"���� are�]constan��rts��c���߽[���t�q�n9�]�for�closed�terms��q����of��T��ƹ.�If��t��is�an��M�@�-term��t�,�let�[�t�]����2����a�b�S�e�the�closed���� term��of��T��|�obtained�from��t��b��ry�replacing�eac�h�constan�t��c���߽[���t�q�n9�]�b�y�a�closed�term��q�a�in���� the���equiv��X�alence�class�[�q�n9�].�Then�[�t�]����2��� p�is�w��rell-dened.�Dene������2�����(�x;����[�t�])���=�[�x:��[�t�]����2�����].���� By���axiom�(�� �s�),�this�is�a�w��rell-dened�op�S�eration�on�equiv��X�alence�classes:�if��T�J��pro�v�es���� �t�UR�=��s�then��T��n�pro��rv�es��[�t�]����2���V�=�UR[�s�]����2������and�hence��x:����[�t�]����2����=�UR�x:��[�s�]����2�����.����!���src:252LambdaLogic.texW��Ve���v��rerify�that�the�axioms�of�lam�b�S�da�logic�hold�in��M�@�.�First,�the�(�� �O�)�axiom:���� �Ap�(�x:���t;�r�S��)�)�=��t�[�x��:=��r��].�goIt�suces�to�consider�the�case�when��t��has�only��x��free.���� The�N�in��rterpretation�of�the�left�side�in��M��ɹis�the�equiv��X�alence�class�of��Ap�(�x:���t;�r�S��).���� The�*-in��rterpretation�of�the�righ�t�side�is�the�class�of��t�[�x�UR�:=��r�S��].�*-Since�these�t�w�o�terms���� are�5�pro��rv��X�ably�equal,�their�equiv�alence�classes�are�the�same,�v��rerifying�axiom�(�� �O�).���� No��rw���for�axiom�(�� �s�).�Supp�S�ose��t��and��s��are�closed�terms�and��Ap�(�t;���x�)�p�=��Ap�(�s;�x�)���is���� v��X�alid�ذin��M�@�.�Then�for�eac��rh�closed�term��r�S��,�w�e�ha�v�e��tr�,>�pro�v��X�ably�equal�to��sr�S��.�Since���� �T����con��rtains��innitely�man�y�constan�t�sym�b�S�ols,�w�e�can�select�a�constan�t��c��that���� do�S�es�x�not�o�ccur�in��t��or��s�,�so��tc�F��=��sc�x��is�pro��rv��X�able.�Replacing�the�constan�t��c��b�y�a���� v��X�ariable�V�in�the�pro�S�of,��tx�
2�=��sx�V��is�pro��rv�able.�Hence�b��ry�axiom�(�� �s�),��x:���t�
2�=��x:�s�V��is���� probable,���and�hence�that�equation�holds�in��M�@�.�In�v��rerifying�axiom�(�� �s�),�it�suces���� to�5Rconsider�the�case�when��s��and��t��are�closed�terms.�The�axiom�(����)�holds�in��M���� �since�'it�simply�asserts�the�equalit��ry�of�pairs�of�pro�v��X�ably�equal�terms.�The�axiom���� �T���6�=��F�`#�holds�since��T��do�S�es�not�pro��rv�e�`#�T���=��F�,�b�S�ecause��T��is�consisten��rt.�That���� completes��the�pro�S�of.��� ���� �Theorem���5.3�(Axioma��32tiza�tion���of�first-order�theorems):���r�~�src:270LambdaLogic.tex�L��ffet�+E�T���b�e�a���� rst��or��ffder�the�ory,�and�let��A��b�e�a�rst�or�der�sentenc�e.�Then��T��|�pr�oves��A��in���� lamb��ffda�w{lo�gic�if�and�only�if�for�some�p�ositive�inte�ger��n�,��T�A�plus�\ther�e�exist��n���� �distinct�35things"�pr��ffoves��A��in�rst�or�der�lo�gic.����� Mt��� ���`� ��� ����M.��fJ.�Beeson����� ����� �� �src:274LambdaLogic.tex�Pr��ffo�of�.�iRFirst�supp�S�ose��A��is�pro��rv��X�able�from��T��plus�\there�exist��n��distinct�things".��� �� W��Ve��Osho��rw��A��is�pro�v��X�able�in�lam�b�S�da�logic,�b�y�induction�on�the�length�of�the�pro�S�of���� of�F]�A�.�Since�lam��rb�S�da�logic�includes�rst�order�logic,�the�induction�step�is�trivial.���� F��Vor�p%the�basis�case�w��re�m�ust�sho�w�that�lam�b�S�da�logic�pro�v�es�\there�exist��n��distinct���� things"���for�eac��rh�p�S�ositiv�e�in�teger��n�.�The�classical�constructions�of�n�umerals�in���� lam��rb�S�da��calculus�pro�duce�innitely�man��ry�distinct�things.�Ho�w�ev�er,�it�m�ust�b�S�e���� c��rhec�k�ed��that�their�distinctness�is�pro��rv��X�able�in�lam�b�S�da�logic.�Dening�n�umerals���� as���on�p.�130�of�(�1���)�w��re�v�erify�b�y�induction�on��n��that�for�all��m�\<�n�,�������2�d����m����2�e���'�6�=�����2�d���n����2�e����� �is�Knpro��rv��X�able�in�lam�b�S�da�logic.�If��m��<�n�쌹+�1�Knthen�either��m���=��n�,�Knin�whic�h�case�w�e���� are��-done�b��ry�the�induction�h�yp�S�othesis,�or��m��̹=��n�.��-So�what�has�to�b�e�pro��rv�ed��-is���� that�for�eac��rh��n�,�lam�b�S�da�logic�pro�v�es�����2�d��[%�n����2�e�����6�=�������2�d���n��ҹ+�1����2�e��G �.�This�in�turn�is�v�eriable�b�y���� induction��on��n�.����!���src:283LambdaLogic.texCon��rv�ersely��V,���supp�S�ose�that��A��is�not�pro��rv��X�able�in��T�-��plus�\there�exist��n��distinct���� things"��Mfor�an��ry��n�.�Then�b�y�the�completeness�theorem�for�rst�order�logic,�there���� is��an�innite�mo�S�del��M���of��:�A�;�indeed�w��re�ma�y�assume�that��M���has�innitely���� man��ry�h�elemen�ts�not�denoted�b�y�closed�terms�of��T��ƹ.�Then��M����can�b�S�e�expanded�to�a���� lam��rb�S�da�U�mo�del����x����^������M���JF�satisfying�the�same�rst�order�form��rulas,�b�y�dening�arbitrarily���� the��drequired�op�S�eration������2��� Uh�on��M�@�-terms,�and�then�inductiv��rely�dening�relations���� �E� ��(�x;���y�n9�)��and��Ap����M�����to�serv��re�as�the�in�terpretations�of�equalit�y�and��Ap��in����x�� v�^������M������.�A���� detailed�>�pro�S�of�is�a��rv��X�ailable�at�the�author's�w�eb�site;�space�do�S�es�not�p�ermit�it�to���� b�S�e��repro�duced�here�as�it�requires�three�pages.��#���� �6.��*�1Sk���olemization��ZZ�� �src:292LambdaLogic.tex�W��Ve��no��rw�consider�the�pro�S�cess�of�Sk�olemization.�This�is�imp�S�ortan�t�for�automated���� deduction,�=since�it�is�used�to�prepare�a�problem�for�submission�to�a�theorem���� pro��rv�er�]<that�requires�clausal�form.�This�can�b�S�e�extended�from�ordinary�logic�to���� lam��rb�S�da��logic,�but�unlik�e�in�ordinary�logic,�the�axiom�of�c�hoice�is�required:��RӍ��� �Theorem���6.1�(Sk���olemiza��32tion):��� �c�src:296LambdaLogic.tex�L��ffet�8�T�8�b�e�a�the�ory�in�lamb�da�lo�gic.�Then�we���� c��ffan�oenlar�ge�T�%to�a�new�the�ory�S�%by�adding�new�function�symb�ols�(Skolem�symb�ols)���� such�I�that�(1)�the�axioms�of�S�I�ar��ffe�quantier-fr�e�e�and�(2)�in�lamb�da�lo�gic�+�A��2C,���� S�35and�T�pr��ffove�the�same�the�or�ems�in�the�language�of�T.���� �src:301LambdaLogic.texPr��ffo�of�.��The�pro�S�of�is�the�same�as�for�ordinary�logic{w��re�eliminate�one�alternating���� quan��rtier��fat�a�time.�Consider��8�x�9�y�n9P��ƹ(�x;���y��).��fW��Ve�add�a�new�function�sym�b�S�ol��f���� �and��the�(Sk��rolem)�axiom��xx�� �w��8�x�9�y�n9P��ƹ(�x;���y��)�UR�!�8�xP��(�x;���f�G��(�x�))�:���� �src:304LambdaLogic.tex�In���the�presence�of�this�Sk��rolem�axiom,�if��8�x�9�y�n9P��ƹ(�x;���y��)���is�an�axiom�of��T����it�can�b�S�e��� �� eliminated��in�fa��rv�or��of��8�xP��ƹ(�x;���f�G��(�x�)),�whic��rh�has�one�quan�tier�few�er.�It�remains�to���� pro��rv�e��that�adding�suc��rh�a�Sk�olem�axiom�to��T�� �+�8Z�AC����do�S�es�not�add�an�y�new�theorems���� in�G�the�language�of��T��ƹ.�By�the�lam��rb�S�da�completeness�theorem,�it�suces�to�sho�w���� that�@�an��ry���-mo�S�del�of��T��t�+�O��AC�f�can�b�e�expanded�to�a���-mo�del�of�the�Sk��rolem�axiom.����� _x��� ���`� ��� ���Lam��!b�M�da��fLogic����� ����� �� �Let�� (�M� ��;�������2�����)�b�S�e�a���-mo�del�of��T��2�+�Tl�AC� ܞ�.�Assume��M�$�satises��8�x�9�y�n9P��ƹ(�x;���y��).�� Since��� �� �M����satises�^�AC� ܞ�,�there�is�some��u��in��M��suc��rh�that��M��satises��8�xP��ƹ(�x;���Ap�(�c����u��k;�x�)).���� (Here����c����u�� -��is�a�constan��rt�denoting�the�elemen�t��u��of��M�@�;�tec�hnically������2������is�dened�on���� �M�@�-terms.)�XIn��rterpret�the�Sk�olem�function�sym�b�S�ol��f�\W�as�the�function��x�UR�7!��Ap�(�u;���x�).���� Similarly��V,��if��r�>6�is�an��ry��M�@�-term�p�S�ossibly�in�v�olving��f�G��,�let��r��S����2�0��o�b�S�e�dened�as�follo�ws:��� ���� ���r��S�����0������ �ca�=����� ���r���~�if�r�>6�do�S�es�not�con��rtain��f������ ���� �f�G��(�t�)�����0������ �ca�=����� ���Ap�(�c����u��k;���t�����0���9�)������� �src:319LambdaLogic.texNo��rw��Bw�e�extend������2���VF�to�a�function������2�0��d{�dened�on�terms�in�v�olving�the�new�sym�b�S�ol��f��� �� �as��w��rell�as�the�other�sym�b�S�ols�of��T��n�and�constan�ts�for�elemen�ts�of��M�@�,�b�y�dening���� ��o������0���9�(�x;���t�)�UR=�����������(�x;�t�����0���9�)���� �src:322LambdaLogic.texThe��righ��rt�side�is�dened�since��t����2�0���J�do�S�es�not�con�tain��f�G��.�Note�that�when��t��do�S�es�not���� con��rtain�f�G��,�w�e�ha�v�e��t����2�0��#��=�UR�t��and�hence������2�����(�x;���t�)�=������2�0���9�(�x;�t�).����!���src:325LambdaLogic.texConsider�I�the���-structure�(�M��@��2�0���;�������2�0���9�),�where��M��@��2�0��X��is��M��Ĺaugmen��rted�with�the�giv�en���� in��rterpretation�מof��f�G��.�W��Ve�claim�that�this���-structure�is�actually�a���-mo�S�del�of���� �T�-��+��AC�
�that�5osatises�the�Sk��rolem�axiom.�F��Vorm�ulas�whic�h�do�not�con�tain�the���� Sk��rolem� sym�b�S�ol��f�h�are�satised�in�(�M� ��;�������2�����)�if�and�only�they�are�satised�in�(�M��@��2�0���;�����2�0���9�),���� since�!�on�suc��rh�terms�w�e�ha�v�e������2�����(�x;���t�)�UR=������2�0���9�(�x;�t�)�!�as�noted�ab�S�o��rv�e.�!�Therefore�(�M��@��2�0���;�����2�0���9�)���� is��wa���-mo�S�del�of��T�u��+��˿AC� ܞ�,�and�w��re�ha�v�e�already�sho�w�ed�that�it�satises�the�Sk�olem���� axiom.��That�completes�the�pro�S�of.��$ ��� �7.��*�1The�ffLogic�of�P���artial�T���ferms��� �� �src:332LambdaLogic.tex�In���the�group�theory�example�near�the�end�of�the�in��rtro�S�duction,�it�is�natural�to���� ask���whether��x�Td���y�R-�needs���to�b�S�e�dened�if��x��or��y��do�S�es�not�satisfy��G�(�x�).�In�rst���� order�+�logic,����is�a�function�sym��rb�S�ol�and�hence�in�an�y�mo�S�del�of�our�theory�in�the���� usual�, sense�of�rst�order�logic,����will�b�S�e�in��rterpreted�as�a�function�dened�for���� all�2�v��X�alues�of��x��and��y��ֹin�the�mo�S�del.�The�usual�w��ra�y�2�of�handling�this�is�to�sa��ry���� that�)�the�v��X�alues�of��x�ե���y���for�)̿x��and��y��not�satisfying��G�(�x�)�or��G�(�y�n9�)�are�dened�but���� irrelev��X�an��rt.�%�F��Vor�example,�in�rst�order�eld�theory�,�1�=�0�is�dened,�but�no�axiom���� sa��rys�H3an�ything�ab�S�out�its�v��X�alue.�As�this�example�sho�ws,�the�problem�of�\undened���� terms"�9mis�already�of�in��rterest�in�rst�order�logic,�and�t�w�o�dieren�t�(but�related)���� logics�O\of�undened�terms�ha��rv�e�O\b�S�een�dev��relop�ed.�W��Ve�explain�here�one�w��ra�y�O\to�do���� this,��kno��rwn�as�the��L��ffo�gic�35of�Partial�T���erms�(LPT).�See�(�4���)�or�(�3��),�pp.�97-99.����!���src:342LambdaLogic.texLPT��6has���a�term-formation�op�S�erator��#�,�and�the�rule�that�if��t��is�a�term,�then��t�UR�#��is���� an���atomic�form��rula.�One�migh�t,�for�example,�form�ulate�eld�theory�with�the�axiom���� �y���6�=���0��!��x=y��#���(using�inx�notation�for�the�quotien��rt�term).�Thereb�y�one�w�ould���� a��rv�oid��the�(sometimes)�incon��rv�enien�t��ction�that�1�=�0�is�some�real�n��rum�b�S�er,��but���� it�B�do�S�esn't�matter�whic��rh�one�b�ecause�w��re�can't�pro�v�e�an�ything�ab�S�out�it�an�yw�a�y;���� man��ry�:computerized�mathematical�systems�mak�e�use�of�this�ction.�T��Vaking�this����� o��� ���`� ��� ����M.��fJ.�Beeson����� ����� �� �approac��rh,�!one�m�ust�then�mo�S�dify�the�quan�tier�axioms.�The�t�w�o�mo�S�died�axioms��� �� are��as�follo��rws:������ �#��8�x���A����^��t�UR�#!��A�[�x��:=��t�]����� ���� �#ֿA�[�x�UR�:=��t�]����^��t�UR�#!�9�x���A������ �src:351LambdaLogic.tex�Th��rus��+from�\all�men�are�mortal",�w�e�are�not�able�to�infer�\the�king�of�F��Vrance�is���� mortal"�Y�un��rtil�w�e�sho�w�that�there��is��a�king�of�F��Vrance.�The�other�t�w�o�quan�tier���� axioms,�Nand�the�prop�S�ositional�axioms,�of�rst�order�logic�are�not�mo�died.�W��Ve���� also��add�the�axioms��x�UR�#��for�ev��rery�v��X�ariable��x�,�and��c��#��for�eac��rh�constan�t��c�.����!���src:355LambdaLogic.texIn�O|LPT,�w��re�do�not�assert�an�ything�in�v�olving�undened�terms,�not�ev�en�that���� the�r�king�of�F��Vrance�is�equal�to�the�king�of�F�rance.�The�w��rord�\strict"�is�applied���� here��to�indicate�that�subterms�of�dened�terms�are�alw��ra�ys��dened.�LPT��has�the���� follo��rwing�A%\strictness�axioms",�for�ev�ery�atomic�form�ula��R�Zo�and�function�sym�b�S�ol���� �f�G��.��In�these�axioms,�the��x����i��O��are�v��X�ariables�and�the��t����i���are�terms.������nwI�R�J�(�t���̽1����;����:�:�:��ʜ;���t����n���P�)�UR�!��t���̽1��V�#�^���:�:�:��uF�^����t����n�����#����� ����nwI�f�G��(�t���̽1����;����:�:�:��ʜ;���t����n���P�)�UR�#!��t���̽1��V�#�^���:�:�:��uF�^����t����n�����#��������nwI�t���̽1��V�#�UR^�����:�:�:��uF�^����t����n�����#�^�f�G��(�x���̽1����;����:�:�:��ʜ;���x����n���P�)��#!��f��(�t���̽1����;����:�:�:��ʜ;���t����n���P�)��#������ �src:364LambdaLogic.tex�R��ffemark�.�ƳIn�LPT,�while�terms�can�b�S�e�undened,�form��rulas�ha�v�e�truth�v��X�alues�just���� as��_in�ordinary�logic,�so�one�nev��rer�writes��R�J�(�t�)�UR�#��for�a�relation�sym�b�S�ol��R�J�.�That�is���� not��legal�syn��rtax.����!���src:366LambdaLogic.texW��Ve���write��t�����P���UR�������n:�=��������r���to�abbreviate��t�UR�#�_�r����#!��t��=��r�S��.���That�is,�F�or�example,�a�sp�S�ecial���� case��of�this�sc��rhema�is���� ��L�t�UR�=��r����!��t��#�^�r��#���F�� �src:369LambdaLogic.tex�It��follo��rws�that��t�����P�������������ƹ=�������r�q�really�means�\�t��and��r��are�b�S�oth�dened�and�equal,�or�b�oth���� undened."����!���src:371LambdaLogic.texThe�?�equalit��ry�axioms�of�LPT�?�are�as�follo�ws�(in�addition�to�the�one�just�men-���� tioned):������ ��X�x�UR�=��x����� ���� ��Xx�UR�=��y�Ë�!��y��=��x�������� ��Xt�����P���UR�������n:�=��������r��6�^�����[�x�UR�:=��t�]��!���[�x��:=��r�S��]�����!�F��� �8.��*�1P���artial�ffLam�b�s3da�Calculus���m�� �src:380LambdaLogic.tex�In�
lam��rb�S�da�calculus,�the�issue�of�undened�terms�arises�p�erhaps�ev��ren�more�nat-���� urally��gthan�in�rst�order�logic,�as�it�is�natural�to�consider�partial�recursiv��re�func-���� tions,��whic��rh�are�sometimes�undened.�����2�z�����-�����#�X��^��z����( �There���is,�of�course,�an�alternativ���e�to��
�b>