Exercise 119.1.
The first derivation synthesizes 𝑥 :𝐴, inserts 𝑎 :𝐴 →𝐵, and then inserts 𝑐 :𝐵 →𝐷, producing 𝑐(𝑎(𝑥)). The second inserts 𝑏 :𝐴 →𝐶 and then 𝑑 :𝐶 →𝐷, producing 𝑑(𝑏(𝑥)). Coherence requires the target-theory function equality Γ⊢𝜆𝑥.𝑐(𝑎(𝑥))≡𝜆𝑥.𝑑(𝑏(𝑥)):𝐴→𝐷. An equality after substituting one selected 𝑥 :𝐴 does not compare the cast programs at all inputs and therefore does not satisfy path coherence.
Exercise 119.2.
The permitted derivation synthesizes (𝑥,𝑦) :𝐴 ×𝐵 by Coe-Pair and checks it at 𝟐 by one Coe-Insert along 𝜎, yielding 𝗍𝗍. The attempted second derivation tries to check 𝑥 :𝐴 at 𝐴′ inside Coe-Pair; that premise cannot use Coe-Insert, because Coe-Pair demands synthesis for both components. The programmer can write the annotation (𝑥 :𝐴′), which lets Coe-Ann synthesize 𝐴′ after checking 𝑥 along 𝜄. The pair then synthesizes 𝐴′ ×𝐵, and final insertion along 𝜏 yields 𝖿𝖿.
Exercise 119.3.
The domain path is contravariant: 𝑝 ∈𝖢𝗈𝖾(𝐴2,𝐴1). For each 𝑥 :𝐴2, the codomain path is 𝑞𝑥∈𝖢𝗈𝖾(𝐵1(𝗉𝗋𝗈𝗀𝑝𝑥),𝐵2(𝑥)). Given 𝑓 :Π𝑦 :𝐴1.𝐵1(𝑦), first 𝗉𝗋𝗈𝗀𝑝𝑥 :𝐴1, then 𝑓(𝗉𝗋𝗈𝗀𝑝𝑥) :𝐵1(𝗉𝗋𝗈𝗀𝑝𝑥), and finally 𝗉𝗋𝗈𝗀𝑞𝑥(𝑓(𝗉𝗋𝗈𝗀𝑝𝑥)) :𝐵2(𝑥). Abstraction over 𝑥 and 𝑓 gives the cast from Π𝑦 :𝐴1.𝐵1(𝑦) to Π𝑥 :𝐴2.𝐵2(𝑥). Reversing 𝑝 would make the first application ill typed at 𝑥 :𝐴2.
Exercise 119.4.
For 𝑟 :𝖱𝖾𝖼1, the first field is 𝗉𝗋𝗈𝗀𝑝(𝑟.𝑛) :ℕ. The second is 𝗉𝗋𝗈𝗀𝑞𝑟.𝑛(𝑟.𝑣):𝖵𝖾𝖼𝐴′(𝗉𝗋𝗈𝗀𝑝(𝑟.𝑛)), because 𝑟.𝑣 :𝖵𝖾𝖼 𝐴 (𝑟.𝑛) and 𝑞𝑟.𝑛 has the corresponding dependent source and target. Thus the full cast is (𝗉𝗋𝗈𝗀𝑝(𝑟.𝑛),𝗉𝗋𝗈𝗀𝑞𝑟.𝑛(𝑟.𝑣)) :𝖱𝖾𝖼2. For 𝑝 =𝗂𝖽, choosing 𝑞𝑛 =𝗆𝖺𝗉 𝛼 gives the well-typed second field 𝗆𝖺𝗉 𝛼(𝑟.𝑣) :𝖵𝖾𝖼 𝐴′ (𝑟.𝑛). If 𝗉𝗋𝗈𝗀𝑝 =𝗌𝗎𝖼, the required type is instead 𝖵𝖾𝖼 𝐴′ (𝗌𝗎𝖼(𝑟.𝑛)); reusing 𝗆𝖺𝗉 𝛼(𝑟.𝑣) :𝖵𝖾𝖼 𝐴′ (𝑟.𝑛) is ill typed.
Exercise 119.5.
Write the dependent application premises before completion as Γ⊢𝑓:(𝑥:𝐾1)𝐾2,Γ⊢𝑡:𝐾1. Completing their derivations separately may instead produce Γ′⊢𝑓′:(𝑥:𝐾′1)𝐾′2,Γ″⊢𝑡′:𝐾″1. The application rule can be rebuilt only after proving Γ′ =𝑇Γ″ and 𝐾′1 =𝑇𝐾″1. Basic-edge coherence does not itself establish either equality. Lemma 5.3 shows that the operations used while completing derivations preserve equality of the relevant presupposed judgments, and Corollary 3.6 supplies coherence in 𝑇[𝑅]0𝐾. Lemma 5.7 then proves derivation independence where both completion images are defined, and Theorem 5.8 proves totality.
Section 4 leaves open a simple general condition on arbitrary rule forms of 𝑇 and arbitrary basic-rule systems 𝑅 that guarantees this argument that matches these presuppositions. The proved result covers the displayed logical-framework systems, the stated coherent rule sets, and the cited inductive schemata.