Lectures onType Theory
ch:proof-tactics: ch:proof-tactics
appendix sectionsolutions

ch:proof-tactics: ch:proof-tactics

Exercise 114.1.

Define apply(f) on (ΓB) to return the one goal (ΓA) with validation V(a)=fa. If Γa:A, then the variable premise gives Γf:AB, and application gives ΓV(a):B. Hence the returned state satisfies the validation invariant.

Exercise 114.2.

The states, with their validations to the preceding state, are [(AA×A)]id[(x:AA×A)]pλx.p[(x:AA),(x:AA)](p,q)(p,q)[]()(x,x). Sequencing partitions the empty final argument list into the two nullary assumption validations and substitutes both returned occurrences of x into the split validation. Substitution of that pair into the intro validation gives the closed term λx.(x,x):AA×A.

Exercise 114.3.

Let T1=intro;assumption, which returns p1=λx.x. Let T2 be exact((λz:AA.z)(λx:A.x)), which returns the beta-distinct raw term p2=(λz:AA.z)(λx:A.x). Both kernel-check at AA, and p2 beta-reduces to p1. Thus T1orelseT2 records the intro/assumption trace, whereas the reversed choice records one exact step. Left bias changes the raw proof and trace; validity of the selected branch supplies a kernel proof in either order.

Search the book

Type to search the local edition.