Lectures onType Theory
ch:first-order-proof-theory: ch:first-order-proof-theory
appendix sectionsolutions

ch:first-order-proof-theory: ch:first-order-proof-theory

Exercise 3.1.

The displayed binder y would capture the free y being inserted. Choose a{x,y} fresh and open the existential at a: (y(R(x,y)P(y)))[y/x]=α(a(R(x,a)P(a)))[y/x]=a(R(y,a)P(a)). Its free-variable set is {y}. The occurrences of a are bound by the existential. Naive textual replacement would give y(R(y,y)P(y)), in which the inserted occurrence of y in the first argument of R has been captured.

Exercise 3.2.

Put H=x(P(x)Q(x)). Choose distinct eigenvariables a,b absent from H. The complete cut-free derivation is XP(a)P(a)AxP(a)Q(a)P(a)L1HP(a)LHxP(x)RXQ(b)Q(b)AxP(b)Q(b)Q(b)L2HQ(b)LHxQ(x)RH(xP(x))(xQ(x))R. The eigenvariable checks are afv(H) and bfv(H). Both Ax leaves already have their full side contexts, which are empty. No WL application occurs or is needed.

Exercise 3.3.

Let Γ={x(P(x)Q(x)),xP(x)}. Translating the outer L gives the following E tree: xP(x)ΓΓNxP(x)Hypx(P(x)Q(x))Γ,P(a)Γ,P(a)Nx(P(x)Q(x))HypΓ,P(a)NP(a)Q(a)EP(a)Γ,P(a)Γ,P(a)NP(a)HypΓ,P(a)NQ(a)EΓ,P(a)NxQ(x)IΓNxQ(x)E. The whole displayed tree is the requested E subderivation. The LJ eigenvariable condition for the final L says that a is absent from Γ, the conclusion, and the existential formula being eliminated. Translation changes only rule notation and not any of those formulas or contexts, so exactly the same freshness check licenses E.

exercise 3.4.

The unreduced principal cut has the form D:ΓB[t/x]ΓxBSomeRE:Δ,B[a/x]Cafv(Δ,C,xB)Δ,xBCSomeLΓ,ΔCCut. First alpha-freshen a away from t,Γ,Δ,C. Individual substitution sends E to a derivation E[t/a]:Δ,B[t/x]C; the conclusion is unchanged because afv(Δ,C). The reduct is D:ΓB[t/x]E[t/a]:Δ,B[t/x]CΓ,ΔCCut. Its cut formula B[t/x] is a proper instance of the body of the original existential formula, hence has smaller formula rank.

Exercise 3.5.

Let D:ΓA, and suppose the derivation using A ends in a nonprincipal L: D:ΓAEB:Δ,A,BKEC:Δ,A,CKΔ,A,BCKLΓ,Δ,BCKCut. Because BCA, the cut formula is a side formula of the final rule. Commute the cut into both premises and rebuild L: D:ΓAEB:Δ,A,BKΓ,Δ,BKCutD:ΓAEC:Δ,A,CKΓ,Δ,CKCutΓ,Δ,BCKL. Both new cuts still cut on A, so their formula rank is |A|. The old height sum is h(D)+1+max(h(EB),h(EC)). The two recursive sums are respectively h(D)+h(EB) and h(D)+h(EC), each strictly smaller.

exercise 3.6.

Put H=x(P(x)Q(x)). With T={c,d} and c enumerated first, the first L choice adds P(c)Q(c). Its L premises ask for P(c) and continue from Q(c) toward Q(d); neither closes by Ax, so this alternative fails. The next L choice uses d, and the remaining branch closes by L and two axioms: P(d)P(d)Q(d)Q(d)P(d),P(d)Q(d)Q(d)ImpLP(d),HQ(d)AllL. Counting an axiom as height one gives height three, so a height-first search has an upper bound of three. It cannot have height two: the atomic goal is not Ax in the initial context, so its last rule must first expose the universal assumption by All-L. The resulting atomic goal is still not Ax; its last rule must expose the instantiated implication by Imp-L. Only the two premises of that second logical rule are Ax leaves. Thus every derivation has height at least three, independently of the order in which search tries rule instances. Reversing the enumeration tries d first and removes the failed c-sibling. Enumeration order changes failed work before success, not the least derivation height. Enlarging T adds only legal instances and therefore preserves soundness, but each quantifier choice can add branches before the successful instance is tried.

Exercise 3.7.

Label the universal assumption by h and the existential assumption by k. A proof term for the running derivation is unpack(k;a,p.pack(a,h[a]p)). Indeed, inside the unpack body, h[a]:P(a)Q(a), so h[a]p:Q(a), and packing witness a gives xQ(x). The unpack eigenvariable is absent from the outer context and result formula.

Replace k by a package pack(c,p), where p:P(c). The existential beta step is unpack(pack(c,p);a,u.pack(a,h[a]u))ppack(c,h[c]p). In the corresponding principal cut, the producing derivation ends with R from P(c), while the using derivation ends with L from a premise using P(a). Freshen a, substitute c/a through the using premise, and replace the cut on xP(x) by a cut on the smaller formula P(c). The final proof-label substitution of p for u is exactly the existential beta contraction displayed above; it is not the structural rule C-L.

exercise 3.8.

Delete the side condition from E. From the second assumption and a temporary assumption P(a), implication elimination yields R(a): xP(x)P(a)R(a)P(a)R(a)ER(a)E. The displayed derivation is invalid in the real system because a occurs free in the undischarged assumption and in the conclusion. To see the semantic failure, use a two-element domain with a=0, let P(1) be true and P(0) false, and let R(0) be false. Then xP(x) is true and P(a)R(a) is vacuously true, while R(a) is false.

exercise 3.9.

Write H=x(P(x)Q(x)), and choose afv(H,c). The producing and using derivations are D=XP(c)P(c)AxP(c)xP(x)R, Ea=XP(a)P(a)AxXQ(a)Q(a)AxQ(a)xQ(x)RP(a),P(a)Q(a)xQ(x)LH,P(a)xQ(x)LH,xP(x)xQ(x)L.

Cutting D against Ea on xP(x) derives P(c),HxQ(x). With axioms at height one, h(D)=2 and h(Ea)=5. The quantified cut formula has rank one, so the initial measure is (1,7).

Both last rules are principal. Substitute c for the fresh eigenvariable a in the minor premise of L and replace the original cut by XP(c)P(c)AxH,P(c)xQ(x)P(c),HxQ(x)Cut. The new cut formula P(c) has rank zero. Its premises have heights one and four, so the measure is (0,5)<(1,7). The left premise is Ax; eliminating this identity cut leaves the instantiated minor derivation and no residual cuts.

Bounded cut-free search with pool {c} can return that same minor derivation after the substitution c/a: instantiate H by c, use L, and introduce the existential with witness c. A different rule order may introduce the existential earlier or print exchanges and weakenings explicitly. Both trees prove the same end sequent and contain no Cut, but the calculus does not make their printed syntax canonical.

Practical route.

After the mathematical cut calculation above, build the bounded searcher of exercise 3.10 in appendix F; its frozen run is recorded in appendix E.

Search the book

Type to search the local edition.