Lectures onType Theory
ch:dependent-intersections: dependent intersections
appendix sectionsolutions

ch:dependent-intersections: dependent intersections

exercise 93.1.

Elimination gives left(d):A and right(d):B. Both projections erase to erase(d), so DI-I gives both(left(d),right(d)):x:AB. The two beta rules return the two displayed projections, and DI-η identifies the rebuilt view with d. The same-erasure premise is discharged by the two projection erasure equations.

exercise 93.2.

Ordinary intersection permits no dependency but both eliminations return the same subject; taking a would-be body B(x) exhibits the missing dependency. A dependent sum permits dependency but its projections erase to distinct pair projections, as witnessed by (0,refl). A refinement {x:AP(x)} permits P to mention x and returns the data subject, but proof elimination returns the stored certificate rather than that same erasure. Dependent intersection permits the dependency and both views erase to one program. The rejected term both(λx.x,λx.0) shows that dependency alone does not waive its same-subject premise.

exercise 93.3.

Let A be the carrier view, B(r) the multiplication view, and C(r) the view containing e:r.car and the two equations r.mul(e,x)=x and r.mul(x,e)=x. The type is r:A(b:B(r)C(r,b)). The natural instance is one label function s, annotated successively as the carrier N, addition, and unit 0 with the two arithmetic proofs. Every intersection projection erases to s; field selection alone chooses a label branch.

Semantically, the left association says RA(t,t)(RB(t,t)RC(t,t)) and the right association says (RA(t,t)RB(t,t))RC(t,t). Propositional associativity gives equivalence. Functionality of B and C ensures that changing a related representative does not change either later conjunct.

exercise 93.4.

Expanding equation 93.1 on the left gives RA(t,t)RBt,t(t,t)RCt,t(t,t). Expanding the outer and inner intersections on the right gives the identical three conjuncts, parenthesized oppositely. Associativity of conjunction therefore proves extensional equality. When the inner representative changes from t to u with RA(t,u), functionality supplies equality of the B-fiber; related B representatives then supply equality of the C-fiber. Without those two transports the third conjunct would be representative dependent.

exercise 93.5.

For DI-I, the two typing premises place the common erasure class E in RA and in the selected RBE; the erasure premise identifies the two classes, so their conjunction holds. For DI-E2, intersection membership selects the RB conjunct, while the first projection chooses the same representative used in its fiber. Substitution commutes with both conjuncts; in the second it also substitutes in the family index, and functionality identifies the resulting fibers.

If functionality is removed, take related a,a in RA but define B(a) to be the total PER and B(a) the empty PER. A subject t can then satisfy the second conjunct under a but not under a. Thus elimination and substitution depend on the representative and validation fails.

Search the book

Type to search the local edition.