Example 6.1 (Scott 1981, PRG-19, §6) — the tree algebra D^§ and the domain #
equation
D^§ ≅ D + (D^§ × D^§)
Following Dana Scott, Lectures on a Mathematical Theory of Computation, PRG-19
(1981), Lecture VI,
Introduction to domain equations. Starting from a fixed domain D (a
neighbourhood system over Δ)
Scott iterates the product D × D indefinitely and collects all the iterates
into a single
domain D^§, the tree algebra over D. The construction:
- the tokens of
D^§live inΓ = {1,2}* 0 Δ— a finite{1,2}-path (here aList Bool,true = 1,false = 2) followed by a separator0and aD-token inΔ. We model this asList Bool × αwith the master neighbourhoodΓ = {t | t.2 ∈ Δ}; - the neighbourhoods of
D^§are the least family containing (i)Γ, (ii)0X = {([], a) ∣ a ∈ X}forX ∈ 𝒟, and (iii)1P ∪ 2QforP, Q ∈ 𝒟^§. This is the inductive predicateMemS.
The heart of the example is Scott's verification that D^§ is a neighbourhood
system: closure under
consistent intersection, proved by induction on the way X was put into D^§,
using the standing
assumption ∅ ∉ 𝒟 (passed as hD : ∀ X, 𝒟.mem X → X.Nonempty). The pay-off is
the domain
equation
D^§ ≅ D + (D^§ × D^§),
formalized as the order-isomorphism dsharpEquiv : (Dsharp D hD).Element ≃o (sum D (prod …) …).Element,
i.e. Dsharp D hD ≅ᴰ sum D (prod (Dsharp D hD) (Dsharp D hD)) ….
We use the project's + (sum, Exercise 3.18) and × (prod, Definition 3.1).
All data is
choice-free (#print axioms ⊆ {propext, Quot.sound}).
Token embeddings 0X, 1P, 2Q and the master Γ. #
Intersection identities. #
Subset / injectivity. #
Nonemptiness and ⊆ Γ. #
The neighbourhood system D^§. #
Example 6.1 (Scott 1981, PRG-19). The neighbourhoods of D^§, defined
inductively as the
least family of subsets of Γ containing (i) Γ, (ii) 0X for X ∈ 𝒟, and
(iii) 1P ∪ 2Q
whenever it already contains P and Q. This is Scott's fixed-point family
𝒟^§ = {Γ} ∪ {0X ∣ X ∈ 𝒟} ∪ {1P ∪ 2Q ∣ P, Q ∈ 𝒟^§}.
- gamma {α : Type u_1} {D : NeighborhoodSystem α} : MemS D (Gamma D)
- zero {α : Type u_1} {D : NeighborhoodSystem α} {X : Set α} : D.mem X → MemS D (embZero X)
- pair {α : Type u_1} {D : NeighborhoodSystem α} {P Q : Set (List Bool × α)} : MemS D P → MemS D Q → MemS D (embPair P Q)
Instances For
Example 6.1 — closure under consistent intersection. Scott's central
verification, "by
induction on the number of steps required to put X and Y into 𝒟^§". The
cross cases
(0A ∩ (1P∪2Q) = ∅, etc.) are discharged because the consistency witness Z is
non-empty
(memS_nonempty); the 0A ∩ 0B case uses 𝒟's own closure; the (1P∪2Q) ∩ (1P'∪2Q') case recurses
on P, P' and Q, Q'.
Example 6.1 (Scott 1981, PRG-19). The tree algebra D^§: a
neighbourhood system over
Γ = {1,2}* 0 Δ, under the standing assumption ∅ ∉ 𝒟 (hD).
Equations
- Domain.Neighborhood.Example61.Dsharp D hD = { mem := Domain.Neighborhood.Example61.MemS D, master := Domain.Neighborhood.Example61.Gamma D, master_mem := ⋯, inter_mem := ⋯, sub_master := ⋯ }
Instances For
Inversion lemmas for D^§-neighbourhoods. #
Because the three neighbourhood shapes Γ, 0X, 1P ∪ 2Q are mutually
distinguishable (by the
shape of their {1,2}-paths, using non-emptiness), a D^§-neighbourhood of a
given shape can only
have arisen from the matching constructor.
The right-hand side of Scott's domain equation: the sum system D + (D^§ × D^§).
Equations
Instances For
A sum-neighbourhood of the form 1V arises only from the right factor, so V ∈ 𝒟^§ × 𝒟^§.
Example 6.1 — the forward half of the domain equation. Sends an element
z of D^§ to an
element of D + (D^§ × D^§), recording for each branch which 0X/1V
neighbourhoods z reaches:
0X ∈ toS z ↔ embZero X ∈ z and 1(P∪Q) ∈ toS z ↔ (1P∪2Q) ∈ z.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Example 6.1 — the inverse half of the domain equation. Sends an element
s of
D + (D^§ × D^§) back to an element of D^§.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Example 6.1 (Scott 1981, PRG-19) — the domain equation, as an
order-isomorphism.
|D^§| ≃o |D + (D^§ × D^§)|.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Example 6.1 (Scott 1981, PRG-19) — the domain equation D^§ ≅ D + (D^§ × D^§). The tree
algebra D^§ is, as a domain, isomorphic to D + (D^§ × D^§) — Scott's defining
isomorphism, "as can
be seen by reference to the equation for D^§ and the definitions of + and
×".
The isomorphic injections x ↦ x^§ and x, y ↦ ⟨x, y⟩. #
Scott exhibits the finite-element structure of |D^§| through two one-one
(information-preserving)
injections: λx. x^§ : D → D^§ and λx, y. ⟨x, y⟩ : D^§ × D^§ → D^§, with bottom
⊥ = {Γ}
(the system's own bot).
Scott's injection x^§ = {Γ} ∪ {0X ∣ X ∈ x} of a D-element into D^§.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Example 6.1 (Scott 1981, PRG-19). λx. x^§ is an isomorphic injection:
x^§ ⊑ x'^§ ↔ x ⊑ x'
(in particular one-one).
Scott's pairing ⟨x, y⟩ = {Γ} ∪ {1P ∪ 2Q ∣ P ∈ x, Q ∈ y} of two
D^§-elements.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Example 6.1 (Scott 1981, PRG-19). λx, y. ⟨x, y⟩ is an isomorphic
injection:
⟨x, y⟩ ⊑ ⟨x', y'⟩ ↔ x ⊑ x' ∧ y ⊑ y'.