Theorem 7.4 (Scott 1981, PRG-19, §7) — + and × preserve effective givenness #
Following Dana Scott, Lectures on a Mathematical Theory of Computation, PRG-19, Lecture VII.
Theorem 7.4. If
𝒟₀and𝒟₁are effectively given, then so are(𝒟₀ + 𝒟₁)and(𝒟₀ × 𝒟₁). Moreover the combinatorsinᵢ,outᵢ,projᵢare all computable; further, iffandgare computable maps, then so aref + gandf × g.
This file: the product (×) half. Scott takes 𝒟₀ × 𝒟₁ = {Xₙ⁰ ∪ Xₘ¹ ∣ n, m}
with a one-one
pairing function r(n, m) and W_k = X⁰_{p(k)} ∪ X¹_{q(k)}; we realize r = Nat.pair,
p = ·.unpair.1, q = ·.unpair.2, and the project's prodNbhd/prod (over α ⊕ β,
Product.lean). The product is uniform (no tag analysis), so both of Scott's
relations decompose
into conjunctions of the components' relations under index reindexing, handled
entirely by the
choice-free closure layer of Recursive.lean
(RecDecidable.and/.comp/.of_iff):
prodPresentation,prod_isEffectivelyGiven— the product is effectively given;proj₀_isComputable,proj₁_isComputable—(Xₙ⁰ ∪ Xₘ¹) projᵢ Z ↔ (component) ⊆ Zis recursively decidable (a slice ofincl_computable), hence r.e.;paired_isComputable—⟨f, g⟩is computable whenf, gare (conjunction of two r.e. relations);prodMap_isComputable—f × gis computable, viaf × g = ⟨f ∘ p₀, g ∘ p₁⟩(Exercise 3.19) andcomp_isComputable(Proposition 7.3).
The sum (+) half — which needs tag analysis, hence a little more choice-free
recursion theory
(truncated subtraction, equality/disjunction deciders) — is in the companion
development.
Everything here is ⊆ {propext, Quot.sound} (choice-free).
Scott's W_k = X⁰_{p(k)} ∪ X¹_{q(k)} with p = ·.unpair.1, q = ·.unpair.2.
Equations
- Domain.Neighborhood.prodEnum P₀ P₁ t = Domain.Neighborhood.prodNbhd (P₀.X (Nat.unpair t).1) (P₁.X (Nat.unpair t).2)
Instances For
Theorem 7.4 (Scott 1981, PRG-19) — 𝒟₀ × 𝒟₁ is effectively given. The
presentation
W_k = X⁰_{p k} ∪ X¹_{q k}. Scott's 7.1(i) and (ii) each split, via
prodNbhd_inter /
prodNbhd_subset_iff, into the conjunction of the two factors' relations on the
projected
indices — recursively decidable by RecDecidable.and/.comp/.of_iff.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Theorem 7.4 (Scott 1981, PRG-19). The product of effectively given domains is effectively given.
Theorem 7.4 (Scott 1981, PRG-19) — proj₀ is computable. (Xₙ⁰ ∪ Xₘ¹) p₀ X⁰_k ↔ Xₙ⁰ ⊆ X⁰_k,
a recursive slice of incl_computable, hence r.e.
Theorem 7.4 (Scott 1981, PRG-19) — proj₁ is computable. (Xₙ⁰ ∪ Xₘ¹) p₁ X¹_k ↔ Xₘ¹ ⊆ X¹_k
(Scott's worked example), a recursive slice of incl_computable.
Theorem 7.4 (Scott 1981, PRG-19) — the paired map ⟨f, g⟩ is computable.
Zₙ ⟨f, g⟩ (X⁰_k ∪ X¹_l) ↔ Zₙ f X⁰_k ∧ Zₙ g X¹_l, the conjunction of two r.e. relations.
Theorem 7.4 (Scott 1981, PRG-19) — the product functor f × g is
computable. Using
f × g = ⟨f ∘ p₀, g ∘ p₁⟩ (Exercise 3.19) together with computability of projᵢ
and comp
(Proposition 7.3).
The sum (+) half of Theorem 7.4 #
The sum 𝒟₀ + 𝒟₁ (Exercise318.lean, over Option (α ⊕ β)) has three kinds of
neighbourhood —
the master {Λ}∪0Δ₀∪1Δ₁, the left copies 0X, the right copies 1Y — so its
presentation deciders
require a genuine tag analysis (Scott: "the neighbourhood relations have to be
worked out in terms of
the indices … recursively enumerable relations … closure under conjunctions,
disjunctions, …"). We
enumerate with a Nat.pair tag: tag 0 ↦ 0X⁰ₖ, tag 1 ↦ 1X¹ₖ, tag ≥ 2 ↦
master.
Scott's Z₀ = Δ, Z_{2n+1} = X⁰ₙ, Z_{2n+2} = X¹ₙ, realized with a Nat.pair
tag: tag = 0 ↦ 0X⁰,
tag = 1 ↦ 1X¹, else the master.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Distinctness of the three neighbourhood kinds (uses non-emptiness). #
Equality of two sum-neighbourhoods, in the indices. Both master, or same tag with equal component.
Equality of two enumerated 𝒟₀-neighbourhoods is recursively decidable
(antisymmetry of ⊆,
decided by incl_computable).
sumEnum u.1 = sumEnum u.2 is recursively decidable (the of_iff
translation of
sumEnum_eq_iff into the tag/component deciders).
Every enumerated sum-neighbourhood lies under the master (no non-emptiness needed).
M ∩ Z = Z: the master absorbs on the left.
Z ∩ M = Z: the master absorbs on the right.
Decidability of the sum-presentation intersection equality relation.
Decidability of the sum-presentation consistency relation.
Primitive-recursive index chosen for sum intersections.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The sum-presentation intersection index is primitive recursive.
The sum-presentation intersection index specifies the actual intersection when consistent.
The master index of the sum presentation denotes the sum master.
Theorem 7.4 (Scott 1981, PRG-19) — 𝒟₀ + 𝒟₁ is effectively given. The tag
enumeration
Z (pair 0 n) = 0X⁰ₙ, Z (pair 1 n) = 1X¹ₙ, Z (pair (≥2) _) = M. Scott's
7.1(i)/(ii) follow the
intersection table: master absorbs, 0X ∩ 0X' = 0(X∩X') reduces to 𝒟₀, 0X ∩ 1Y = ∅ is
impossible (non-emptiness). The deciders are assembled from eqSEdec, the tag
deciders
(natEq/not/and/or), and the components' interEq/cons.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Theorem 7.4 (Scott 1981, PRG-19). The sum of effectively given domains is effectively given.
Theorem 7.4 (Scott 1981, PRG-19) — in₀ is computable. X⁰ₙ (in₀) Z_m ↔ 0X⁰ₙ ⊆ Z_m, which
tag-decodes to (m = 0X⁰ ∧ X⁰ₙ ⊆ X⁰_{m.2}) ∨ (m = master) (m = 1X¹ is
impossible as X⁰ₙ ≠ ∅).
Theorem 7.4 (Scott 1981, PRG-19) — in₁ is computable. Symmetric to
in₀.
Theorem 7.4 (Scott 1981, PRG-19) — out₀ is computable. Z_n (out₀) X⁰_m ↔ leftPart Z_n ⊆ X⁰_m; tag-decoded, leftPart is X⁰_{n.2} on a left copy and Δ₀ on a right
copy/master, so the
relation is incl against either n.2 or the master index k₀ (X⁰_{k₀} = Δ₀).
Theorem 7.4 (Scott 1981, PRG-19) — out₁ is computable. Symmetric to
out₀ via
rightPart.
Theorem 7.4 (Scott 1981, PRG-19) — f + g is computable. Tag-decoding the
sum relation,
Zₙ (f+g) W_m holds iff W_m is the codomain master (decidable in m's tag), or
both are left
copies (tag 0) with X⁰_{n.2} f Y⁰_{m.2}, or both are right copies (tag 1)
with
X¹_{n.2} g Y¹_{m.2}. The three disjuncts are r.e. (REPred.or): each copy case
conjoins a decidable
tag test with the reindexed r.e. relation of f/g.