Exercise 3.14 (Scott 1981, PRG-19, §3) — the diagonal map #
Scott's Exercise 3.14 makes two points.
The disjointness of
Δ₀andΔ₁is unnecessary. Working over a denumerable token alphabetΣ = {0, 1}, one may tag the two factors, taking the product system over0Δ₀ ∪ 1Δ₁with neighbourhoods0X ∪ 1Y. OurProduct.leanalready realizes exactly this tagging abstractly: the disjoint union of token typesα ⊕ βis the type-theoretic incarnation of0Δ₀ ∪ 1Δ₁, andprodNbhd X Y = Sum.inl '' X ∪ Sum.inr '' Yis0X ∪ 1Y. So no separate construction is needed —prod V₀ V₁is the tagged product, and the revised pairing⟨x, y⟩ispair(Definition 3.1).The diagonal
diag : 𝒟 → 𝒟 × 𝒟,diag(x) = ⟨x, x⟩. This is the paired map⟨I, I⟩of the identity with itself (Definition 3.3), so it is approximable for free, andtoElementMap_diagcomputesdiag(x) = ⟨x, x⟩fromtoElementMap_paired.
The n-fold product 𝒟₀ × ⋯ × 𝒟_{n-1} over ⋃_{i<n} 1ⁱ0 Δᵢ is obtained by
iterating the binary
prod (it is associative up to isomorphism, Exercise 3.15); the binary diagonal
here is the
n = 2 instance of the general diagonal x ↦ ⟨x, …, x⟩.
Everything is choice-free (#print axioms ⊆ {propext, Quot.sound}).
Exercise 3.14 (Scott 1981, PRG-19). The diagonal approximable mapping
diag : 𝒟 → 𝒟 × 𝒟, defined as the paired map ⟨I_𝒟, I_𝒟⟩ of the identity with
itself.
Equations
Instances For
Exercise 3.14 (Scott 1981, PRG-19). diag(x) = ⟨x, x⟩ for every x ∈ |𝒟|.
Exercise 3.14 (Scott 1981, PRG-19). Post-composing the diagonal with the
two projections
returns the identity: p₀ ∘ diag = I and p₁ ∘ diag = I.