Lectures onType Theory
ch:corecursive-definitions: ch:corecursive-definitions
appendix sectionsolutions

ch:corecursive-definitions: ch:corecursive-definitions

Exercise 124.1.

The prepared tuple is prepn:N(0)=(0). Hence Co-Tail-Unfold gives tail(from(0))from(suc0). A second preparation and its normalizer-defined group-free premise are prepn:N(suc0)=(suc0),suc0Tsuc0. Thus Co-Head-Producer gives head(from(suc0))suc0. The head observation rule derives from(suc0)headsuc0. The path-step rule combines this judgment with the tail premise and derives from(0)tailhead1.

Exercise 124.2.

The two head aliases give the zero edges and the three tail steps give the positive edges: f0g,g0h,f1g,g1h,h1f. The head of h is a producer, so h emits no zero edge. Deleting the positive edges leaves the path fgh. One valid rank is r(f)=2, r(g)=1, r(h)=0; the required inequalities are r(g)<r(f) and r(h)<r(g).

Exercise 124.3.

The two maps are determined by the state constructors: h(ine)=0,h(ino)=1,t(ine)=ino,t(ino)=ine. Normalizer stability gives ineTine. The generated Block-comp branch contracts t(ine) to ino, and soundness, completeness, and stability give t(ine)Tino. Rule Coiter-Tail therefore derives tail(coiter(h,t,ine))coiter(h,t,ino).

Exercise 124.4.

Take state S=N, head method h(n)=n, and transition t(n)=sucn. Then from(n) elaborates to coiter(h,t,n). On the source, from(0)tail3head3 by three uses of the tail equation, producing states 1,2,3, followed by the head equation. On the target, three instances of the second coiterator rule and one head instance give tail(coiter(h,t,0))CoiterTailcoiter(h,t,1),tail(coiter(h,t,1))CoiterTailcoiter(h,t,2),tail(coiter(h,t,2))CoiterTailcoiter(h,t,3),head(coiter(h,t,3))CoiterHeadh(3)T3. Thus both finite observations return three.

Exercise 124.5.

The rank is r(f)=2, r(g)=1, r(h)=0, as computed in exercise 124.2. The only edge leaving h is its tail step h1f, and every directed cycle must leave h, because the zero subgraph fgh has no edge out of h and any cycle avoiding h would have to return from g, which has no edge to f. So every cycle uses the positive edge hf.

For productivity, order demands by the pair consisting of the number of tail symbols in the observation word and the stored rank of the demanded function. A zero edge passes the same demand and strictly decreases the rank; a positive edge discharges one tail symbol, strictly decreasing the first component, after which the rank may reset freely. At head, the demand at f follows two zero edges to h and returns the numeral 0. At tailo, one tail step moves to the next function with the strictly shorter demand o. Lexicographic induction on the pair therefore answers every finite observation word, in this group always with 0.

Search the book

Type to search the local edition.