Lectures onType Theory
ch:rewriting-reflection: ch:rewriting-reflection
appendix sectionsolutions

ch:rewriting-reflection: ch:rewriting-reflection

Exercise 115.1.

If μ counts additions, then μ(a)<μ(a+0)=μ(a)+1. Hence only the orientation from a+0 to a satisfies the strict-decrease premise; the reverse orientation increases the measure. Admitting both produces the repeating three-term segment a+0,a,a+0, whose last term is the first term. Repetition of that segment is infinite, so the well-founded recursive call used by the simplifier is unavailable.

Exercise 115.2.

Let N(t) count additions and let L(t)=u+vt|u|, where |u| is the number of syntax nodes and the sum ranges over addition subterms. Order (N,L) lexicographically. Each zero rule lowers N. The rule (a+b)+ca+(b+c) preserves N and lowers L by |a|+1; all unchanged subterms contribute equally. Thus the extended database terminates. Bottom-up simplification gives (a+0)+(b+(0+c))=cong+;a+0=aa+(b+(0+c))=cong+;0+c=ca+(b+c). The result is right associated, so no associativity root remains.

Exercise 115.3.

Given p:n=m, dependent congruence for transport first changes the vector fiber. For v:VecAn, the certificate is transportVecA:(p:n=m)VecAnVecAm,(p,v)transportpv. Rebuilding an outer dependent application therefore uses transportpv:VecAm. Omitting the transport offers the unchanged term v:VecAn where the rebuilt head requires an argument of type VecAm. That application is ill typed unless conversion already derives nm, which a propositional proof p alone does not provide.

Search the book

Type to search the local edition.