Answers to starred exercises 165These two types have no common substitution-instance, because if such an instancewere obtained by substitutions [a/a, f /b] and [y/c, 5/d] we would geta = y-*b, a--+f = 6,which would imply the impossible identity a - y--+a--+/t.7C7.2 (i) Let M - I and T = (b-.b)-*b-+b. Define i° - (a-+b)-+c-+d; then r° isskeletal and changes to T when we make the identifications [b/a], [b/c], [b/d]. Thealgorithm begins by applying the proof of 7C2, which begins by applying the proofof 7C1 to build a term whose PT is T°-+T°; and the procedure in that proof givesI, -Then, following the proof of 7C2, the algorithm definesM+ - IToM =_ IT-'-It then applies the PT algorithm to compute T+ - PT(M+); in fact in this caseT+ = T° and the identifications s1,..., sk in 7C7 are [b/a], [b/c], [b/d] (and k = 3).The next step is to apply the proof of 7C5 to build three terms N1, N2, N3 in turn,such thatPT(NI) [b/d]T+ (a-*b)->c-*b,PT(N2) [b/c][b/d]T+ (a-+b)->b-+b,PT(N3) = [b/a] [b/c] [b/d]T+ (b-+b)-+b-+b.To do this, the algorithm first applies 7C4 to obtain three terms R1, R2, R3 such thatPT(RI) = (d->.f)-->(g->b)-*((a->b)->c-*d)-+((a-*g)->c->f),PT(R2) = (f--+c)-+(g-+bl)-+((a->bl)-+c-->b2)-'((a-*g)-*f-*b2),PT(R3) =(a-+f)-'(g-'bl)-'((a-Bbl)-+b2-b3)-'((f-'g)-,b2-.b3).Then the algorithm definesNI - N2 - N3 -Finally it defines M* - N3. (By the way, the algorithm is not claimed to be efficient!There exists a much shorter M* than the one above, namely M*(ii) Let M - K, ,r - b--+b--+b. Define T° - a--+b--+c; then T° has the 1-property andchanges to r under the identifications [b/a], [b/c]. The algorithm begins by applyingthe proof of 7C1 to build a term whose PT is T°-+T°; this term isIT' -Then, following the proof of 7C2, the algorithm definesM+-IToM-IT0Kand computes T+ - PT(M+); in this case T+ - a-+b-+a and for the identificationssl, ... , sk in 7C7 we have k = 1 and sl - [b/a]. The next step is to apply 7C5'sproof to build N such thatPT(N) __ [b/a]T+ b-+b-+b.
166 Answers to starred exercisesTo do this, the algorithm first applies 7C4 to obtain a term R such thatPT(R) = (f-*a1)-*(g-*b)->(al->b-->a2)-+(f-*g-*a2),and then defines N - (Ax'Rxx)I(I,.K).8A12.1 The eight regions contain the following terms in order from left to right.Top row: Axy'xy, Axyz'x(xyyy)z, 2xyzu'x(xyyy)zu, Axyzu'xyzu;bottom row: Ax-x, Axyz'xz(xyyy), Axyzu'xu(xyyy)z, Axyzu'uxyz.8B7 For items 1, 6, 8, 11 in Table 8B7a see 8B3-8B6. For the rest, see the answer to8C6.4. (In item 12, PO Nprinc(T) since the PT of Po is ((a--+a)--+b)-+b by the PTalgorithm, 3E1.)8C6.4 For rows 6, 8 and 11 of Table 8B7a see Examples 8C6.1-3. The other rowsare dealt with below. (For ease of reading, types are omitted and x'M is used forx(x(... (xM) ...)) with d x's.)1. d(T,0) = {V}, ,q/(T,1) = 0.2. &/('r,0) _ {V}, .sJI(T,1) _ {Ax1'x1}.3. .Q/' (T,0) _ {V}, Ql(T,1) _ {Ax1x2'xl}.4. d(T,0) _ {V}, d(T,1) _ {Ax1x2x3'x1 VI 1, .9/(T,2) = {Ax1x2x3'x1(x2V2)},,SV(T, 3) = {Ax1x2x3'x1(x2x3)}5. .Ql(T,0) = {V}, Q/(T,1) = {Ax1x2x3'x1 V1 V2}, JV(T,2) = {Axlx2x3'xlx3x2}.7. crl(T,0) = {V}, d(T,1) = {Axix2'x1 V1 V2}, 4(T,2)= {Ax1x2'x1x2x2}.9. 5z/(T,O) = {V}, .21(T, 1) = {Axix2'xl V1, Axtx2'x2}srl(T,d) = {2x1x2'xiVd, Axlx2'xi-1x2} for all d > 2.10. Al(T,O) = {V}, .sal(T, 1) = V1}, sl(T,2) = {Ax1x2'xlx2}.12. d(T,0) = {V}, s.V/(T,1) = {Ax'xVl}d(T,2) =Ax'x(Ayryi)}d(T,3) =2x'x(2y1'x(2y2'xV3))2x'x(AY1'x(2Y2'Y1)), Ax'x(2Y1'x(2Y2'Y2))},(V(T,d) _ {2x'x(Ayl'x(... (2yd-1'xVd)...)),Ax'x(Ay1'x(... (AYd-2'x(AYd-1'Y1))...)), ...2x'x(Ay1'x(... (AYd-2'x(AYd-1'Yd-1))...))} for all d 4.8E7.3 For (iii), use (ii) and the fact that #(szl(T,0)) = 1 (since d(T,0) = {VT} byStep 0 of Algorithm 8C6).For (i), use induction on d. The basis is trivial since d(T, 0) = {V' J.For the induction step (d to d+ 1), let XT E d(T, d) contain q metavariables where1 < q < ITId, and let VP be one of these.Consider Part Hal of Step d + 1 of Algorithm 8C6: using the notation of IIal,note that each suitable replacement YfP generated by IIal for VP contains < n1metavariables, where n1 is the arity of a1. But o1 occurs in p which occurs in T by8E7.1, soni < jail - 1 < ITI - 1 < ITI.
- Page 2 and 3:
BASIC SIMPLE TYPE THEORY
- Page 4 and 5:
BASIC SIMPLE TYPE THEORYJ. Roger Hi
- Page 6:
To Carol
- Page 9 and 10:
VlllContents7C The converse PT proo
- Page 11 and 12:
xIntroductionhave proved themselves
- Page 14 and 15:
1The type-free A-calculusThe R-calc
- Page 16 and 17:
1A A-terms and their structure 31A6
- Page 18 and 19:
I B #-reduction and #-normal forms
- Page 20 and 21:
IC rl- and firs-reductions 7Proof S
- Page 22 and 23:
IC q- and iq-reductions93TFig. lC7a
- Page 24 and 25:
1D Restricted A-terms 11(ii) The BC
- Page 26 and 27:
2A The system TAA 132A2 Definition
- Page 28 and 29:
2A The system TA, 152A5.1 Notation
- Page 30 and 31:
2A The system TA2172A8.3 Example Le
- Page 32 and 33:
Proof Trivial from 2A9.2A The syste
- Page 34 and 35:
2B The subject-construction theorem
- Page 36 and 37:
2B The subject-construction theorem
- Page 38 and 39:
2C Subject reduction and expansion2
- Page 40 and 41:
2D The typable terms 27However, Cha
- Page 42 and 43:
2D The typable terms 292D8.1 Note T
- Page 44 and 45:
3A Principal types and their histor
- Page 46 and 47:
3A Principal types and their histor
- Page 48 and 49:
3B Type-substitutions 353B1 Notatio
- Page 50 and 51:
3B Type-substitutions 37Then r U (s
- Page 52 and 53:
3C Motivating the PT algorithm 39(i
- Page 54 and 55:
3D Unification 41this pair was show
- Page 56 and 57:
3D Unification 43If pk * Tk and the
- Page 58 and 59:
A' _ §(Ap) for some s; hence in pa
- Page 60 and 61:
3E The PT algorithm 47Let r - rl U
- Page 62 and 63:
3E The PT algorithm 49for some subs
- Page 64 and 65:
3E The PT algorithm 513E4 Further R
- Page 66 and 67:
4A The equality rule 53The name "TA
- Page 68 and 69:
(M).4A The equality rule 554A3 Weak
- Page 70 and 71:
4B Semantics and completeness 574A1
- Page 72 and 73:
4B Semantics and completeness 59413
- Page 74 and 75:
4B Semantics and completeness 61Pro
- Page 76 and 77:
5A version using typed termsIn Chap
- Page 78 and 79:
5A Typed terms 655A1.5 Warning If M
- Page 80 and 81:
5B Reducing typed terms(ii) if MT E
- Page 82 and 83:
5B Reducing typed terms 695B5.1 Not
- Page 84 and 85:
5C Normalization theorems 71of rede
- Page 86 and 87:
SC Normalization theorems 73in leng
- Page 88 and 89:
6A Intuitionist implicational logic
- Page 90 and 91:
6A Intuitionist implicational logic
- Page 92 and 93:
6B The Curry-Howard isomorphism 79T
- Page 94 and 95:
6B The Curry-Howard isomorphism 816
- Page 96 and 97:
6B The Curry-Howard isomorphism 83t
- Page 98 and 99:
6C Some weaker logics 85for some cl
- Page 100 and 101:
6C Some weaker logics 87logic in 6A
- Page 102 and 103:
6D Axiom-based versions 89Deduction
- Page 104 and 105:
6D Axiom-based versions 916D6.1 Not
- Page 106 and 107:
The converse principal-type algorit
- Page 108 and 109:
7B Identifications 957A3 Converse P
- Page 110 and 111:
7C The converse PT proofNext, suppo
- Page 112 and 113:
Since (a-+b)* __ a--+b, we must pro
- Page 114 and 115:
7C The converse PT proof 101Conside
- Page 116 and 117:
instance, construct an m.g.c.i. V -
- Page 118 and 119:
AD-7D Condensed detachment 1057D6 M
- Page 120 and 121:
7D Condensed detachment 107Proof By
- Page 122 and 123:
8A Inhabitants 109A Pq-normal inhab
- Page 124 and 125:
8A Inhabitants 1118A7.1 Example Let
- Page 126 and 127:
8A Inhabitants113Fig. 8A12a.8A11.2
- Page 128 and 129: 8B Examples of the search strategy
- Page 130 and 131: 8B Examples of the search strategy
- Page 132 and 133: 8C The search algorithm 119Long(s)
- Page 134 and 135: 8C The search algorithm 121Note. Th
- Page 136 and 137: 8C The search algorithm1238C6.1 Exa
- Page 138 and 139: 8D The Counting algorithm 1258D3.1
- Page 140 and 141: 8E The structure of a nf-scheme 127
- Page 142 and 143: 8E The structure of a nf-scheme129x
- Page 144 and 145: 8E The structure of a nf-scheme131T
- Page 146 and 147: 8F Stretching, shrinking and comple
- Page 148 and 149: 8F Stretching, shrinking and comple
- Page 150 and 151: 8F Stretching, shrinking and comple
- Page 152 and 153: 8F Stretching, shrinking and comple
- Page 154 and 155: 9A The structure of a term 1419A2 D
- Page 156 and 157: 9A The structure of a term(ii) if r
- Page 158 and 159: 9B Residuals 145Proof-note Two case
- Page 160 and 161: 9B Residuals 1479134.1 Lemma Every
- Page 162 and 163: 9C The structure of a TAR-deduction
- Page 164 and 165: 9D The structure of a type 151below
- Page 166 and 167: 9E The condensed structure of a typ
- Page 168 and 169: 9E The condensed structure of a typ
- Page 170 and 171: 9F Imitating combinatory logic in A
- Page 172: [x].N*Before constructing9F Imitati
- Page 175 and 176: 162 Answers to starred exerciseswit
- Page 177: 164 Answers to starred exercisesIf
- Page 182 and 183: BibliographyReferences to unpublish
- Page 184 and 185: Bibliography 171DOSEN, K. [1992a] M
- Page 186 and 187: Bibliography 173KALMAN, J. A. [1983
- Page 188 and 189: Bibliography 175SCEDROV, A. [1990]
- Page 190 and 191: Table of principal typesThis table
- Page 192 and 193: IndexA-logics (see axiom-based logi
- Page 194 and 195: Index 181D-incompleteness of BCI, B
- Page 196 and 197: Index183PT algorithm, converse (see
- Page 198 and 199: Index185#-contraction 4of typed ter